Nodir Gulyamov wrote:
 > Hi Bryan,
 >     Thanks for your reply.
 > I tried to test your solution, but it doesn't work, hence
 > threading.Semaphore object hasn't method to get value of semaphore.
 > I looked to source code of semaphore.py and find out that value is 
private
 > variable.

Your code did not, and could not, use the value of counter for
anything but busy-waiting. You had:

         while counter != 1:
             pass
         # ... continue...

If you replace this with the semaphore, you can just assume a
counter value of one.


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

Reply via email to