bitplane
By: a guest | Feb 9th, 2010 | Syntax:
Python | Size: 0.23 KB | Hits: 11 | Expires: Never
def synchronized(f):
def blockingFunction(self, *args, **kwargs):
self.lock.acquire()
try:
return f(self, *args, **kwargs)
finally:
self.lock.release()
return blockingFunction