-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathshared_memory.pyi
More file actions
43 lines (36 loc) · 1.47 KB
/
Copy pathshared_memory.pyi
File metadata and controls
43 lines (36 loc) · 1.47 KB
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
34
35
36
37
38
39
40
41
42
43
import sys
from collections.abc import Iterable
from types import GenericAlias
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Self
__all__ = ["SharedMemory", "ShareableList"]
_SLT = TypeVar("_SLT", int, float, bool, str, bytes, None)
class SharedMemory:
if sys.version_info >= (3, 13):
def __init__(self, name: str | None = None, create: bool = False, size: int = 0, *, track: bool = True) -> None: ...
else:
def __init__(self, name: str | None = None, create: bool = False, size: int = 0) -> None: ...
@property
def buf(self) -> memoryview | None: ...
@property
def name(self) -> str: ...
@property
def size(self) -> int: ...
def close(self) -> None: ...
def unlink(self) -> None: ...
def __del__(self) -> None: ...
class ShareableList(Generic[_SLT]):
shm: SharedMemory
@overload
def __init__(self, sequence: None = None, *, name: str | None = None) -> None: ...
@overload
def __init__(self, sequence: Iterable[_SLT], *, name: str | None = None) -> None: ...
def __getitem__(self, position: int) -> _SLT: ...
def __setitem__(self, position: int, value: _SLT) -> None: ...
def __reduce__(self) -> tuple[Self, tuple[_SLT, ...]]: ...
def __len__(self) -> int: ...
@property
def format(self) -> str: ...
def count(self, value: _SLT) -> int: ...
def index(self, value: _SLT) -> int: ...
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...