Thread killing - I know I know!

blaine frikker at gmail.com
Mon May 19 20:42:28 EDT 2008


On May 19, 8:16 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Mon, 19 May 2008 20:07:06 -0300, Paul Rubin
> <"http://phr.cx"@NOSPAM.invalid> escribió:
>
> > blaine <frik... at gmail.com> writes:
> >> How is it that you recommend killing a pure python thread?
>
> Make the thread cooperate. It should periodically check some variable or
> condition, and cleanly exit when requested.
>
> >> And also,
> >> when i use the 'threading' module am I creating a process, or a (gasp)
> >> thread?
>
> > A thread.
>
> >> (Is this an obvious question - and if so, how does one create
> >> a 'process'?)
>
> > os.fork()
>
> A more portable answer: using the subprocess module.
>
> --
> Gabriel Genellina

Thanks for the info.  The problem that I'm having is that I get a
thread stuck blocking - waiting for a return from a FIFO (made with
os.mkfifo()).

Blaine



More information about the Python-list mailing list