-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy path_dummy_thread.pyi
33 lines (26 loc) · 1.15 KB
/
_dummy_thread.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
from collections.abc import Callable
from types import TracebackType
from typing import Any, NoReturn
__all__ = ["error", "start_new_thread", "exit", "get_ident", "allocate_lock", "interrupt_main", "LockType"]
if sys.version_info >= (3, 7):
__all__ += ["RLock"]
TIMEOUT_MAX: int
error = RuntimeError
def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any] = ...) -> None: ...
def exit() -> NoReturn: ...
def get_ident() -> int: ...
def allocate_lock() -> LockType: ...
def stack_size(size: int | None = ...) -> int: ...
class LockType:
locked_status: bool
def __init__(self) -> None: ...
def acquire(self, waitflag: bool | None = ..., timeout: int = ...) -> bool: ...
def __enter__(self, waitflag: bool | None = ..., timeout: int = ...) -> bool: ...
def __exit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ...
def release(self) -> bool: ...
def locked(self) -> bool: ...
if sys.version_info >= (3, 7):
class RLock(LockType):
def release(self) -> None: ... # type: ignore[override]
def interrupt_main() -> None: ...