This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Allow for providing 'on_new_thread' callback to 'concurrent.futures.ThreadPoolExecutor'
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.6
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: bquinlan Nosy List: 2uasimojo, bquinlan, harlowja, vstinner
Priority: normal Keywords: patch

Created on 2015-09-01 19:13 by harlowja, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
add_future_callback.patch harlowja, 2015-09-01 19:27 review
Messages (4)
msg249501 - (view) Author: Joshua Harlow (harlowja) * Date: 2015-09-01 19:13
In situations where thread-local variables need to be setup it is quite useful to be able to hook into the thread creation process, so that as each new thread is spun up by the ThreadPoolExecutor that the threads created initially call into a provided callback (the callback can then setup thread local state as needed).
msg249507 - (view) Author: Joshua Harlow (harlowja) * Date: 2015-09-01 19:27
Initial possible patch.
msg341772 - (view) Author: Brian Quinlan (bquinlan) * (Python committer) Date: 2019-05-07 16:24
Do the `initializer` and `initargs` parameters deal with this use case for you?
msg345635 - (view) Author: Brian Quinlan (bquinlan) * (Python committer) Date: 2019-06-14 19:42
Joshua, I'm closing this since I haven't heard from you in a month. Please re-open if you use case isn't handled by `initializer` and `initargs`.
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69168
2019-06-14 19:42:18bquinlansetstatus: open -> closed
messages: + msg345635

assignee: bquinlan
resolution: out of date
stage: resolved
2019-05-07 16:24:29bquinlansetmessages: + msg341772
2015-10-13 19:38:09vstinnersetnosy: + bquinlan
2015-10-13 19:35:43vstinnersetnosy: + vstinner
2015-09-01 19:27:302uasimojosetnosy: + 2uasimojo
2015-09-01 19:27:07harlowjasetfiles: + add_future_callback.patch
type: enhancement ->
messages: + msg249507

keywords: + patch
2015-09-01 19:16:04harlowjasetcomponents: + Library (Lib)
2015-09-01 19:15:50harlowjasettype: enhancement
2015-09-01 19:15:40harlowjasetversions: + Python 3.6
2015-09-01 19:13:12harlowjacreate