Richard Oudkerk added the comment:

Forking as a side effect of importing a module is evil.  I think raising a 
RuntimeError is preferable to trying to make it Just Work.

But maybe one could do

    void
    _PyImport_ReInitLock(void)
    {
        if (import_lock != NULL) {
            import_lock = PyThread_allocate_lock();
            PyThread_acquire_lock(import_lock, WAIT_LOCK);
        }
        import_lock_thread = PyThread_get_thread_ident();
        _PyImport_ReleaseLock();
    }

----------
nosy: +sbt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18122>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to