Re: Python thread

2011-09-01 Thread Adam Skutt
On Sep 1, 5:14 pm, George wrote: > Hi, > Why doesn't python threads show an associated PID?  On spawning python > threads using the threading module I can only see the main thread's pid on > using top or ps unix command, no  subprocesses are displayed. In otherwords > top or ps in not aware of any

Re: Python thread

2011-09-01 Thread Adam Skutt
On Sep 1, 5:54 pm, Terry Reedy wrote: > > Does it mean that python threads are not mapped to the core in the system. > > They all run on the same core. > No, CPython is a native thread implementation, so they'll be scheduled however the kernel sees fit. Only allowing one thread to run at a time

Re: Python thread

2011-09-01 Thread Christian Heimes
Am 02.09.2011 00:46, schrieb Benjamin Kaplan: > Threading is an OS-level construct to allow concurrency within a > single process (and address space). Threads are never supposed to be > separate processes (they aren't at the C-level, so I don't know what > Java is doing here). CPython code has a gl

Re: Python thread

2011-09-01 Thread Terry Reedy
On 9/1/2011 6:08 PM, George wrote: So what exactly does threading module do, if it doesn't create a subprocess. Does each thread have its own stack and PC. What advantage would a threading module provide over sequential execution. https://secure.wikimedia.org/wikipedia/en/wiki/Thread_%28compute

Re: Python thread

2011-09-01 Thread Benjamin Kaplan
On Thu, Sep 1, 2011 at 6:21 PM, Prasad, Ramit wrote: >>So what exactly does threading module do, if it doesn't create a subprocess. >>Does each thread have its own stack and PC. >>What advantage would a threading module provide over sequential execution. > > I believe it merely simulates multiple

RE: Python thread

2011-09-01 Thread Prasad, Ramit
>So what exactly does threading module do, if it doesn't create a subprocess. >Does each thread have its own stack and PC. >What advantage would a threading module provide over sequential execution. I believe it merely simulates multiple processes through scheduling (like the CPU). >From http://

Re: Python thread

2011-09-01 Thread George
So what exactly does threading module do, if it doesn't create a subprocess. Does each thread have its own stack and PC. What advantage would a threading module provide over sequential execution. On 01/09/2011 22:54, "Terry Reedy" wrote: > On 9/1/2011 5:14 PM, George wrote: >> Hi, >> Why doesn'

Re: Python thread

2011-09-01 Thread Terry Reedy
On 9/1/2011 5:14 PM, George wrote: Hi, Why doesn't python threads show an associated PID? On spawning python threads using the threading module I can only see the main thread's pid on using top or ps unix command, no subprocesses are displayed. In otherwords top or ps in not aware of any subpro

RE: python thread state

2006-10-24 Thread Stefan Schukat
For this use case the PyGILState API was introduced. e.g. try PyGILState_STATE state = PyGILState_Ensure() run python code PyGILState_Release(state) Stefan > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Bryan > Sent: Monday, October

Re: Python thread stack size

2006-10-23 Thread Chetan
The default thread allocated in for pthread is 32K if the system default is lower (it is 16K on my system). If the system default is higher, it is used. -Chetan -- http://mail.python.org/mailman/listinfo/python-list