mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Added stub for mutex(py2) (#1509)
This commit is contained in:
committed by
Matthias Kramm
parent
baea852b62
commit
0c7b50378b
15
stdlib/2/mutex.pyi
Normal file
15
stdlib/2/mutex.pyi
Normal 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: ...
|
||||
Reference in New Issue
Block a user