> so if main thread switch it within lock,

Now I imagine that this undesired action can be prevented by referring to the mentioned context information by a local TCL variable instead of using the command “[tsv::get shared context]” in the worker threads.
This can be achieved by a concatenation of two code parts like the following.

   thread::create [string cat "set context $x\n" $suffix]


> … your worker pool (context) is protected by "working" counter, which is not guarantee at the moment that all workers really counted …

I have changed the software design to an approach which works with termination notifications from TCL worker threads.
Unfortunately, it contains also open issues for further development considerations.