mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
16 lines
444 B
Python
16 lines
444 B
Python
# 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: bool
|
|
queue: 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: ...
|