Python does not play well with others

Paul Rubin http
Mon Feb 5 20:16:43 EST 2007


"Graham Dumpleton" <grahamd at dscpl.com.au> writes:
> > Certainly launching any new threads should be postponed til after the
> > fork.  
> 
> Except that you can't outright prevent it from being done as a Python
> module could create the threads as a side effect of the module import
> itself.

Yeah, the preload would have to be part of the server configuration,
requiring appropriate care in choosing the preloaded modules (they'd
normally be stdlib modules which rarely do uncivilized things like
launch new threads on import).  It wouldn't do to let random user
scripts into the preload.

One could imagine languages in which this could be enforced by a
static type system.  Hmm.



More information about the Python-list mailing list