>>> def synchronized(function): def _synchronized(*args,**kw): lock.acquire() try: return function finally: lock.release() return _synchronized
>>> def thread_safe(): pass