Hey guys,

I have a C++ function that I'd like to replicate (as closely as
possible) in Python. Here's an example:

107         void increment_counter( unsigned int& counter )
108         {
109                 boost::mutex::scoped_lock lock( counter_lock );
110                 ++counter;
111         }

A thread locks the function on entrance and then releases it on exit.
What is the equivalent way to do this in Python?

Many thanks!

Brad
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to