mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 04:04:25 +08:00
concurrent.futures: add _work_queue property to ThreadPoolExecutor (#4808)
`ThreadPoolExecutor` assigns a `queue.SimpleQueue` to `_work_queue` in
its `__init__` method.
7cf0aad96d/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