Re: thread lock object.

2005-04-24 Thread Peter Hansen
Irmen de Jong wrote: [EMAIL PROTECTED] wrote: How can we make only one thread at a time be able to access and increment i ? Use a synchronization primitive such as a lock (threading.Lock, threading.RLock) But for simply incrementing a number (i+=1) this is not needed because that operation cannot b

Re: thread lock object.

2005-04-24 Thread [EMAIL PROTECTED]
thanks. Pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: thread lock object.

2005-04-24 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: Hello, I have multi thread program running together and each will increment int i. How can we make only one thread at a time be able to access and increment i ? Thanks in advance, Sincerely Yours, pujo Use a synchronization primitive such as a lock (threading.Lock, threadin

thread lock object.

2005-04-24 Thread [EMAIL PROTECTED]
Hello, I have multi thread program running together and each will increment int i. How can we make only one thread at a time be able to access and increment i ? Thanks in advance, Sincerely Yours, pujo -- http://mail.python.org/mailman/listinfo/python-list