Re: Question on threads

2008-04-11 Thread John Nagle
Steve Holden wrote: > Jonathan Shao wrote: >> On Fri, Apr 11, 2008 at 3:29 PM, Steve Holden <[EMAIL PROTECTED] >> > wrote: >> >> Jonathan Shao wrote: >> >> Hi all, >> I'm a beginner to Python, so please bear with me. >> Is there a way of guar

Re: Question on threads

2008-04-11 Thread Grant Edwards
On 2008-04-11, Steve Holden <[EMAIL PROTECTED]> wrote: > Yes - you are calling it before you have started ALL your > threads, thereby making hte main thread wait for the end of > thread 1 before starting the next. An impressive demonstration > of thread synchronization, Well, that's one way to ge

Re: Question on threads

2008-04-11 Thread Steve Holden
Jonathan Shao wrote: > On Fri, Apr 11, 2008 at 3:29 PM, Steve Holden <[EMAIL PROTECTED] > > wrote: > > Jonathan Shao wrote: > > Hi all, > I'm a beginner to Python, so please bear with me. > Is there a way of guarenteeing that all created th

Re: Question on threads

2008-04-11 Thread Jonathan Shao
On Fri, Apr 11, 2008 at 3:29 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > Jonathan Shao wrote: > > > Hi all, > > I'm a beginner to Python, so please bear with me. > > Is there a way of guarenteeing that all created threads in a program > > are finished before the main program exits? I know that

Re: Question on threads

2008-04-11 Thread Steve Holden
Jonathan Shao wrote: > Hi all, > > I'm a beginner to Python, so please bear with me. > > Is there a way of guarenteeing that all created threads in a program are > finished before the main program exits? I know that using join() can > guarentee this, but from the test scripts I've run, it see

Question on threads

2008-04-11 Thread Jonathan Shao
Hi all, I'm a beginner to Python, so please bear with me. Is there a way of guarenteeing that all created threads in a program are finished before the main program exits? I know that using join() can guarentee this, but from the test scripts I've run, it seems like join() also forces each individ

Beginner question on threads - solved

2007-05-06 Thread Teresa Hardy
If there is the possibility that the same thread had acquired the lock earlier, you should use an RLock instead. Gabriel, Thanks for the great hint. I didn't find RLock in my initial reading. So as I read up on RLock, I did a quick search on vlock. It turns out that I was using vlock as a varia

Re: Beginner question on threads

2007-04-29 Thread Gabriel Genellina
En Sun, 29 Apr 2007 22:50:59 -0300, Teresa Hardy <[EMAIL PROTECTED]> escribió: > I have successfully made the threading work on a Window XP machine with > quad > processors but now I am trying to pass some variables around and am > fighting > with Lock() If there is the possibility that the

Beginner question on threads

2007-04-29 Thread Teresa Hardy
I have successfully made the threading work on a Window XP machine with quad processors but now I am trying to pass some variables around and am fighting with Lock() I have searched through several different documents and forums, some of which hint at problems with threading on Windows machines s