mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
14 lines
362 B
Python
14 lines
362 B
Python
from collections import deque
|
|
from typing import Any, Callable, TypeVar
|
|
|
|
_T = TypeVar("_T")
|
|
|
|
class mutex:
|
|
locked: bool
|
|
queue: deque[Any]
|
|
def __init__(self) -> None: ...
|
|
def test(self) -> bool: ...
|
|
def testandset(self) -> bool: ...
|
|
def lock(self, function: Callable[[_T], Any], argument: _T) -> None: ...
|
|
def unlock(self) -> None: ...
|