Skip to content

Commit 3d14016

Browse files
authored
concurrent.futures: add _work_queue property to ThreadPoolExecutor (#4808)
`ThreadPoolExecutor` assigns a `queue.SimpleQueue` to `_work_queue` in its `__init__` method. https://github.com/python/cpython/blob/7cf0aad96d1d20f07d7f0e374885f327c2d5ff27/Lib/concurrent/futures/thread.py#L144
1 parent cb43535 commit 3d14016

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/3/concurrent/futures/thread.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import queue
12
import sys
23
from typing import Any, Callable, Generic, Iterable, Mapping, Optional, Tuple, TypeVar
34

@@ -13,6 +14,10 @@ if sys.version_info >= (3, 9):
1314
_S = TypeVar("_S")
1415

1516
class ThreadPoolExecutor(Executor):
17+
if sys.version_info >= (3, 7):
18+
_work_queue: queue.SimpleQueue
19+
else:
20+
_work_queue: queue.Queue
1621
if sys.version_info >= (3, 7):
1722
def __init__(
1823
self,

0 commit comments

Comments
 (0)