Message405931
ThreadPool handles tasks concurrently through Threads so users need not worry about the creation/deletion of Threads, it uses reuses threads whenever possible and it can handle any tasks.
However, it should be possible for users to at least name/rename according to the tasks that the user submits into the ThreadPool.
Advantages:
* Good for Debugging (so user can know which thread has caused the issue)
* threadName attribute in logging's LogRecord can now use custom Name provided to the Task.
Until now thread_name_prefix parameter allows us to name the threads but those are not particular to the Task.
Price
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 |
|
Date |
User |
Action |
Args |
2021-11-08 06:51:21 | RahulARanger | set | recipients:
+ RahulARanger |
2021-11-08 06:51:21 | RahulARanger | set | messageid: <1636354281.35.0.0825500750809.issue45689@roundup.psfhosted.org> |
2021-11-08 06:51:21 | RahulARanger | link | issue45689 messages |
2021-11-08 06:51:21 | RahulARanger | create | |
|