-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport thread_name_prefix
from upstream
#64
Conversation
Add optional `thread_name_prefix` argument to constructor of ThreadPoolExecutor. Resolves agronholm#63
concurrent/futures/thread.py
Outdated
@@ -109,6 +110,7 @@ def __init__(self, max_workers=None): | |||
self._threads = set() | |||
self._shutdown = False | |||
self._shutdown_lock = threading.Lock() | |||
self._thread_name_prefix = thread_name_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your PR seems incomplete. This part of the code differs from upstream: https://github.com/python/cpython/blob/master/Lib/concurrent/futures/thread.py#L109-L110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed that. It seems to be from a more recent fix (python/cpython#2315) which should nevertheless be included here. I'll apply the second patch in another commit on this branch.
The tests fail. Please fix the code. I will merge it then. |
c909643
to
d16bb53
Compare
Thanks! |
The thread_name_prefix argument of ThreadPoolExecutor.__init__ was added to the Python 2 backport in agronholm/pythonfutures#64.
The thread_name_prefix argument of ThreadPoolExecutor.__init__ was added to the Python 2 backport in agronholm/pythonfutures#64.
The thread_name_prefix argument of ThreadPoolExecutor.__init__ was added to the Python 2 backport in agronholm/pythonfutures#64.
Add optional
thread_name_prefix
argument to constructor of ThreadPoolExecutor.Resolves #63
cc @agronholm @gpshead