threading.start(): does it fork??

Lionel Ulmer bbrox at bbrox.org
Fri Jan 11 22:54:52 CET 2002


On 11 Jan 2002 13:47:32 -0800, Theodore D. Sternberg <strnbrg at onebox.com> wrote:
>When Python starts a second thread, ps shows not one, not two but
>three (!) python processes.  When the thread exits, there are still
>two python processes.  This can't be normal.

It is normal as Python uses Linux's pthread library to do threading... And
if you do threading in C, you will also have 3 processes instead of 2 (one
process for each thread and a 'controlling' process AFAIK).

                          Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/



More information about the Python-list mailing list