Re: Quick question about threads and interpreters.

2011-08-01 Thread Chris Angelico
On Mon, Aug 1, 2011 at 6:04 AM, Ira Gray tkjthing...@gmail.com wrote: I come along, write a .DLL and throw it into the program. My .dll has its own thread (right?), Not unless you actually create one. A DLL is simply a puddle of code; the application calls your code, you do whatever you do, you

Quick question about threads and interpreters.

2011-07-31 Thread Ira Gray
Lets say I have a program that is running a python interpreter in the main thread. I come along, write a .DLL and throw it into the program. My .dll has its own thread (right?), separate from the main thread, and then makes a pyrun_simplestring call to the pythonxx.dll. The pyrun_simplestring

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

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 seems

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 using

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] mailto:[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

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 get rid

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] mailto:[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

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

Re: Beginner question on threads

2007-04-30 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 same

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