Rotem Yaari wrote:
>> Rotem should simply avoid to fork() in the toplevel code of a module.
>>
> 
> That's exactly the problem - the fork is not done at the module level,
> and the reason for the deadlock is imports inside functions performed
> by various library functions.
> This can happen virtually in every possible step of the program as
> long as the python builtins keep doing it.

Well, Python *builtins* (in the strict sense of the word) usually never
directly import anything, and most of them not even indirectly import
(there are some exceptions, of course, like the __import__ builtin)

So if you are certain that the fork doesn't happen *while* an import
is going, then I think the specific problem must be analyzed in more
detail before an attempt is made to fix it.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to