From 3d14016085aed8bcf0cf67e9e5a70790ce1ad8ea Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Wed, 9 Dec 2020 22:23:19 -0500 Subject: [PATCH] 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 --- stdlib/3/concurrent/futures/thread.pyi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib/3/concurrent/futures/thread.pyi b/stdlib/3/concurrent/futures/thread.pyi index 4b9a8bf6d..e8116c6da 100644 --- a/stdlib/3/concurrent/futures/thread.pyi +++ b/stdlib/3/concurrent/futures/thread.pyi @@ -1,3 +1,4 @@ +import queue import sys from typing import Any, Callable, Generic, Iterable, Mapping, Optional, Tuple, TypeVar @@ -13,6 +14,10 @@ if sys.version_info >= (3, 9): _S = TypeVar("_S") class ThreadPoolExecutor(Executor): + if sys.version_info >= (3, 7): + _work_queue: queue.SimpleQueue + else: + _work_queue: queue.Queue if sys.version_info >= (3, 7): def __init__( self,