sturlamolden wrote: > On Jun 4, 10:11 pm, Josiah Carlson <[EMAIL PROTECTED]> > wrote: > >> lock = threading.Lock() >> >> with lock: >> #synchronized block! >> pass > > True, except that the lock has to be shared among the threads. This > explicit initiation of an reentrant lock is avoided in a Java > synchronized block.
You toss the lock creation in the global namespace of the module for which you would like to synchronize access. - Josiah -- http://mail.python.org/mailman/listinfo/python-list