t.p.threadable : module documentation

Part of twisted.python View Source

A module that will allow your program to be multi-threaded, micro-threaded, and single-threaded. Currently microthreads are unimplemented. The idea is to abstract away some commonly used functionality so that I don't have to special-case it in all programs.
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 responsable for I/O requests (the event loop)?
Function registerAsIOThread Mark the current thread as responsable for I/O requests.
Function _synchPre Undocumented
Function _synchPost Undocumented
def unpickle_lock(): (source)
Undocumented
def _synchPre(self, *a, **b): (source)
Undocumented
def _synchPost(self, *a, **b): (source)
Undocumented
def synchronize(*klasses): (source)
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): (source)
Initialize threading.

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

def getThreadID(): (source)
Undocumented
def isInIOThread(): (source)
Are we in the thread responsable for I/O requests (the event loop)?
def registerAsIOThread(): (source)
Mark the current thread as responsable for I/O requests.
API Documentation for Twisted, generated by pydoctor at 2012-09-01 11:44:56.