Reusable ways to wrapping thread locking techniques

python at python at
Mon Aug 15 19:56:06 CEST 2011

Hit send too soon ...

I'm reviewing a lot of code that has thread acquire and release
locks scattered throughout the code base.

Would a better technique be to use contextmanagers (for safe
granular locking within a function) or decorators (function wide
locks) to manage locks or am I making things too complicated?

Am I reinventing the wheel by creating my own versions of above
or are there off-the-shelf, debugged versions of above that one
can use?

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list