Skip to content
Advertisement

Tag: threadpoolexecutor

Identify current thread in concurrent.futures.ThreadPoolExecutor

the following code has 5 workers …. each opens its own worker_task() BUT ….. inside each worker_task() …… I cannot identify … which of the 5 workers is currently being used (Worker_ID) If I want to print(‘worker 3 has finished’) inside worker_task() ….. I cannot do this because executor.submit does not allow Any solutions? Answer You can get name of

Advertisement