module documentation

from Thinking in Python, Bruce Eckel https://python-3-patterns-idioms-test.readthedocs.io/en/latest/Observer.html

(c) Copyright 2008, Creative Commons Attribution-Share Alike 3.0.

Simple emulation of Java's 'synchronized' keyword, from Peter Norvig.

Class Synchronization You can create your own self.mutex, or inherit from this class
Function synchronize Synchronize methods in the given class. Only synchronize the methods whose names are given, or all methods if names=None.
Function synchronized Synchronize methods with the same mutex
Constant P Undocumented
Type Variable T Undocumented
Class _SynchronizationProtocol Undocumented
def synchronize(klass: type, names: str | Iterable[str] | None = None):

Synchronize methods in the given class. Only synchronize the methods whose names are given, or all methods if names=None.

def synchronized(method: Callable[P, T]) -> Callable[P, T]:

Synchronize methods with the same mutex

P =

Undocumented

Value
ParamSpec('P')
T =

Undocumented

Value
TypeVar('T')