Added stub for mutex(py2) (#1509)

This commit is contained in:
Ashwini Chaudhary
2017-08-02 21:02:10 +05:30
committed by Matthias Kramm
parent baea852b62
commit 0c7b50378b

15
stdlib/2/mutex.pyi Normal file
View File

@@ -0,0 +1,15 @@
# Source: https://hg.python.org/cpython/file/2.7/Lib/mutex.py
from collections import deque
from typing import Any, Callable, TypeVar
_ArgType = TypeVar('_ArgType')
class mutex:
locked = ... # type: bool
queue = ... # type: deque
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: ...