mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add a few missing things from _thread (#13132)
This commit is contained in:
@@ -90,9 +90,6 @@ xml.sax.expatreader
|
||||
# ==========
|
||||
_json.encode_basestring
|
||||
_thread.RLock
|
||||
_thread.allocate
|
||||
_thread.exit_thread
|
||||
_thread.start_new
|
||||
_threading_local._localimpl.localargs
|
||||
_threading_local._localimpl.locallock
|
||||
builtins.SyntaxError.print_file_and_line
|
||||
|
||||
@@ -44,6 +44,12 @@ def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpa
|
||||
@overload
|
||||
def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ...
|
||||
|
||||
# Obsolete synonym for start_new_thread()
|
||||
@overload
|
||||
def start_new(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]], /) -> int: ...
|
||||
@overload
|
||||
def start_new(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def interrupt_main(signum: signal.Signals = ..., /) -> None: ...
|
||||
|
||||
@@ -51,7 +57,9 @@ else:
|
||||
def interrupt_main() -> None: ...
|
||||
|
||||
def exit() -> NoReturn: ...
|
||||
def exit_thread() -> NoReturn: ... # Obsolete synonym for exit()
|
||||
def allocate_lock() -> LockType: ...
|
||||
def allocate() -> LockType: ... # Obsolete synonym for allocate_lock()
|
||||
def get_ident() -> int: ...
|
||||
def stack_size(size: int = 0, /) -> int: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user