mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-26 08:44:14 +08:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user