Skip to content

Commit 07e9af5

Browse files
committed
Fix thread_name_prefix for InterpreterPoolExecutor
1 parent 6a6cd3c commit 07e9af5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/concurrent/futures/interpreter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,7 @@ def __init__(self, max_workers=None, thread_name_prefix='',
118118
each worker interpreter.
119119
initargs: A tuple of arguments to pass to the initializer.
120120
"""
121+
thread_name_prefix = (thread_name_prefix or
122+
(f"InterpreterPoolExecutor-{self._counter()}"))
121123
super().__init__(max_workers, thread_name_prefix,
122124
initializer, initargs)

0 commit comments

Comments
 (0)