Files
typeshed/stdlib/2/mutex.pyi
Jelle Zijlstra 5d553c9584 apply black and isort (#4287)
* apply black and isort

* move some type ignores
2020-06-28 13:31:00 -07:00

15 lines
426 B
Python

# Source: https://hg.python.org/cpython/file/2.7/Lib/mutex.py
from typing import Any, Callable, Deque, TypeVar
_ArgType = TypeVar("_ArgType")
class mutex:
locked: bool
queue: Deque[Any]
def __init__(self) -> None: ...
def test(self) -> bool: ...
def testandset(self) -> bool: ...
def lock(self, function: Callable[[_ArgType], Any], argument: _ArgType) -> None: ...
def unlock(self) -> None: ...