Make multiprocessing pipes generic (#11137)

This commit is contained in:
Avasam
2024-10-01 21:11:42 -04:00
committed by GitHub
parent 44aa63330b
commit bdb5b52d50
6 changed files with 72 additions and 27 deletions

View File

@@ -35,8 +35,8 @@ if sys.platform == "win32":
handle: int, target_process: int | None = None, inheritable: bool = False, *, source_process: int | None = None
) -> int: ...
def steal_handle(source_pid: int, handle: int) -> int: ...
def send_handle(conn: connection.PipeConnection, handle: int, destination_pid: int) -> None: ...
def recv_handle(conn: connection.PipeConnection) -> int: ...
def send_handle(conn: connection.PipeConnection[DupHandle, Any], handle: int, destination_pid: int) -> None: ...
def recv_handle(conn: connection.PipeConnection[Any, DupHandle]) -> int: ...
class DupHandle:
def __init__(self, handle: int, access: int, pid: int | None = None) -> None: ...