| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
decs.GenericWrapper --+
|
SynchronizedObject
Wrap an object and all of its methods with synchronization.
Example:
class SynchronizedObject(GenericWrapper):
''' wrap an object and all of its methods with synchronization '''
def _ _init_ _(self, obj, ignore=( ), lock=None):
if lock is None:
import threading
lock = threading.RLock( )
GenericWrapper._ _init_ _(self, obj, lock.acquire, lock.release, ignore)
From the Python Cookbook.
Copyright: O'Reilly Media
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Apr 17 20:45:14 2010 | http://epydoc.sourceforge.net |