First forking and then multithreading the interpreter?

Jack Diederich jack at performancedrivers.com
Wed May 21 19:21:24 EDT 2003


On Wed, May 21, 2003 at 07:03:42PM -0400, Aahz wrote:
> In article <20030515162922.71620098.bram at nospam.sara.nl>,
> Bram Stolk  <bram at nospam.sara.nl> wrote:
> >
> >Does anyone know what bad things could happen if you first fork python,
> >and then create threads in one of the processes? I would assume this is
> >possible.
> 
> It's possible, but I know there are problems with it.  Unfortunately,
> this is an area of Python I don't know well; you may be able to get some
> help from Google.

Since forking just makes an exact copy of the process, what problems could
there be?  As long as the program doesn't have any external resources (file
descriptors) prior to forking that will cause conflict after, I would think
it would be OK.

-jackdied





More information about the Python-list mailing list