A module to provide some very basic threading primitives, such as synchronization.

Class DummyLock Hack to allow locks to be unpickled on an unthreaded system.
Function unpickle_lock Undocumented
Function synchronize Make all methods listed in each class' synchronized attribute synchronized.
Function init Initialize threading.
Function getThreadID Undocumented
Function isInIOThread Are we in the thread responsible for I/O requests (the event loop)?
Function registerAsIOThread Mark the current thread as responsible for I/O requests.
Function _synchPre Undocumented
Function _synchPost Undocumented
Function _sync Undocumented
def unpickle_lock():
Undocumented
def _synchPre(self):
Undocumented
def _synchPost(self):
Undocumented
def _sync(klass, function):
Undocumented
def synchronize(*klasses):

Make all methods listed in each class' synchronized attribute synchronized.

The synchronized attribute should be a list of strings, consisting of the names of methods that must be synchronized. If we are running in threaded mode these methods will be wrapped with a lock.

def init(with_threads=1):

Initialize threading.

Don't bother calling this. If it needs to happen, it will happen.

def getThreadID():
Undocumented
def isInIOThread():

Are we in the thread responsible for I/O requests (the event loop)?

def registerAsIOThread():

Mark the current thread as responsible for I/O requests.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.