[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Tangellapalli Sai Hanuma Rahul
Tangellapalli Sai Hanuma Rahul added the comment: Yes, it's true, it's so naive method, Contextvars! may be inside the Future Object? -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry Rahul: I'm not the right person to help you push this forward. I'm sympathetic to the problem: I've encountered similar issues in "Real Code", where we needed to associate log outputs generated by worker pool threads with the actual tasks that

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Tangellapalli Sai Hanuma Rahul
Tangellapalli Sai Hanuma Rahul added the comment: In summary; == Current Problem: -- ThreadPoolExecutor handles all threads-related activities so the user needs to just submit tasks and set max_workers and other Executor settings if necessary. If ThreadPoolExecutor

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Tangellapalli Sai Hanuma Rahul
Tangellapalli Sai Hanuma Rahul added the comment: There is a new function submit_with_name in _base.Executor that can accept name parameters before args and kwargs, submit can continue to be used as before. submit internally calls submit_with_name with name as None. Calling submit_with_name

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: > previously one could write .submit(function_name, *args, **kwargs) > but now one should write > .submit(function_name, name_of_thread, *args, **kwargs) > name_of_thread can be None This approach can't work, I'm afraid: it would be a backwards-incompatible

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Alex Waygood
Change by Alex Waygood : -- title: Custom Name for ThreadPoolExecutor -> Add the ability to give custom names to threads created by ThreadPoolExecutor ___ Python tracker ___