1 # Source: https://hg.python.org/cpython/file/2.7/Lib/mutex.py
\r
3 from collections import deque
\r
4 from typing import Any, Callable, TypeVar
\r
6 _ArgType = TypeVar('_ArgType')
\r
9 locked = ... # type: bool
\r
10 queue = ... # type: deque
\r
11 def __init__(self) -> None: ...
\r
12 def test(self) -> bool: ...
\r
13 def testandset(self) -> bool: ...
\r
14 def lock(self, function: Callable[[_ArgType], Any], argument: _ArgType) -> None: ...
\r
15 def unlock(self) -> None: ...
\r