Re: Python threads and memory usage

2008-05-30 Thread Mike
On May 30, 9:42 am, Mike <[EMAIL PROTECTED]> wrote: > On May 30, 9:16 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > > > On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > > > I observed, that every thread reserved some me

Re: Python threads and memory usage

2008-05-30 Thread Mike
On May 30, 9:16 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > I observed, that every thread reserved some memory, and after exit > > thread doesn't freed it. When i leaved my

Re: Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread Francesco Bochicchio
On Wed, 28 May 2008 11:38:53 -0700, RossGK wrote: > > I've answered my own question about the "None" state - an event was > setting the thread to None where I didn't expect it. > > However, my question slightly repositioned is if a Thread is "Stopped" > it still seems to exist. Is there someway

Re: Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread RossGK
I've answered my own question about the "None" state - an event was setting the thread to None where I didn't expect it. However, my question slightly repositioned is if a Thread is "Stopped" it still seems to exist. Is there someway to make it go away, send it to garbage collection etc? Other p

Re: Python Threads - stopped vs. gone vs. Alive

2008-05-28 Thread RossGK
On May 28, 12:01 pm, RossGK <[EMAIL PROTECTED]> wrote: > I'm a newbie to python threads, and playing with some simple client > server stuff and lots of print statements. > > My server thread launched with > self.worker = WorkerThread(self) > completes an interaction and then if I check on it's

Re: Python Threads -

2007-04-19 Thread Daniel Nogradi
> Can you please suggest a technique in Python where we can spawn few number > of worker threads and later map them to a function/s to execute individual > Jobs. Have a look at the threading module: http://docs.python.org/lib/module-threading.html HTH, Daniel -- http://mail.python.org/mailman/li

Re: Python Threads -

2007-04-18 Thread Alex Martelli
S.Mohideen <[EMAIL PROTECTED]> wrote: > Hi All, > > Can you please suggest a technique in Python where we can spawn few number > of worker threads and later map them to a function/s to execute individual > Jobs. > > Any references would be helpful.. I believe I give some examples in the Nutshel

Re: Python Threads -

2007-04-18 Thread Aahz
In article <[EMAIL PROTECTED]>, S.Mohideen <[EMAIL PROTECTED]> wrote: > >Can you please suggest a technique in Python where we can spawn few number >of worker threads and later map them to a function/s to execute individual >Jobs. You can see an example for a web spider on my Python website. --

Re: Python Threads

2007-02-22 Thread Sick Monkey
I think that I found a solution to my thread issues, however I know it is not the most efficient method possible. Just to give you a little information on what this project is all about I have 3 lists of email addresses. (1) "host email address" = contains a list of all of my emails a

Re: Python Threads

2007-02-19 Thread Sick Monkey
Great, thanks for the tip Gabriel! On 2/18/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Sun, 18 Feb 2007 23:37:02 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > Well if this cannot be done, can a thread call a function in the main > method? > I have been trying and have not been suc

Re: Python Threads

2007-02-18 Thread Gabriel Genellina
En Sun, 18 Feb 2007 23:37:02 -0300, Sick Monkey <[EMAIL PROTECTED]> escribió: > Well if this cannot be done, can a thread call a function in the main > method? > I have been trying and have not been successive. Perhaps I am using > thread > incorrectly. The safe way to pass information betwe

Re: Python Threads

2007-02-18 Thread Sick Monkey
Well if this cannot be done, can a thread call a function in the main method? I have been trying and have not been successive. Perhaps I am using thread incorrectly. On 2/18/07, Sick Monkey <[EMAIL PROTECTED]> wrote: Is there anyway to get 2 python threads to talk to one another? I have a GUI

Re: Python Threads and C Semaphores

2007-01-16 Thread Andrew MacIntyre
Dejan Rodiger wrote: > Jeremy said the following on 16.1.2007 8:27: > >> I have a fat C++ extension to a Python 2.3.4 program. In all, I count >> five threads. Of these, two are started in Python using >> thread.start_new_thread(), and both of these wait on semaphores in the C++ >> extension using

Re: Python Threads and C Semaphores

2007-01-16 Thread Dejan Rodiger
Jeremy said the following on 16.1.2007 8:27: > Hello, > > I have a fat C++ extension to a Python 2.3.4 program. In all, I count > five threads. Of these, two are started in Python using > thread.start_new_thread(), and both of these wait on semaphores in the C++ > extension using sem_wait(). There

Re: Python threads and Numeric/SciPy exploit Dual Core ?

2006-10-02 Thread Robert Kern
robert wrote: > Fredrik Lundh wrote: > >> "robert" wrote: >> >>> Simple Python code obviously cannot use the dual core by Python threads. >>> Yet, a program drawing CPU mainly for matrix computations - preferably >>> with Numeric/SciPy - will this profit from a dual core when using 2 (or >>> more

Re: Python threads and Numeric/SciPy exploit Dual Core ?

2006-10-02 Thread robert
Fredrik Lundh wrote: > "robert" wrote: > > >>Simple Python code obviously cannot use the dual core by Python threads. >>Yet, a program drawing CPU mainly for matrix computations - preferably >>with Numeric/SciPy - will this profit from a dual core when using 2 (or >>more) Python threads? > >

Re: Python threads and Numeric/SciPy exploit Dual Core ?

2006-10-02 Thread Fredrik Lundh
Oeyvind Brandtsegg wrote: > I've been trying to make my music app use dual core, > and would very much like some more detailed information on this. > > Excuse my lack of knowledge, > but how do I explicitly release the GIL ? http://docs.python.org/api/threads.html > I haven't learned this, but h

Re: Python threads and Numeric/SciPy exploit Dual Core ?

2006-10-02 Thread Oeyvind Brandtsegg
I've been trying to make my music app use dual core, and would very much like some more detailed information on this. Excuse my lack of knowledge, but how do I explicitly release the GIL ? I haven't learned this, but have found through experimentation that I can release a thread by using time.sle

Re: Python threads and Numeric/SciPy exploit Dual Core ?

2006-10-02 Thread Fredrik Lundh
"robert" wrote: > Simple Python code obviously cannot use the dual core by Python threads. > Yet, a program drawing CPU mainly for matrix computations - preferably > with Numeric/SciPy - will this profit from a dual core when using 2 (or > more) Python threads? as long as the binding releases th