agronholm / pythonfutures

Backport of the concurrent.futures package to Python 2.6 and 2.7
Other
232 stars 51 forks source link

Allow a callback to be called when each thread is started #45

Closed harlowja closed 9 years ago

harlowja commented 9 years ago

It can be quite useful to have a callback run before each thread starts to do work, to setup any thread-local context or other thread specifics that will be used throughout the threads lifecycle. Adding a callback as an init argument allows this to easily occur.

agronholm commented 9 years ago

This is a backport. I will not allow any features that don't exist in upstream code.

harlowja commented 9 years ago

Ok dokie, https://bugs.python.org/issue24980 created :smile: