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||synchronize||Make all methods listed in each class' synchronized attribute synchronized.|
|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.|
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.
Don't bother calling this. If it needs to happen, it will happen.
Are we in the thread responsible for I/O requests (the event loop)?
Mark the current thread as responsible for I/O requests.