• Shane Hathaway's avatar
    Merged shane-fix-startup-branch to HEAD. Summary: · bd241196
    Shane Hathaway authored
    Delayed Zope startup based on changes from Zope-2_7-development-branch
    (with corrections), with the intent of merging this into the 2_6
    branch and the head.
    
    Until now, "import Zope" always opened the database automatically.
    Unfortunately, that strategy caused the Python import lock to be held
    by the main thread during database initialization, which led to a
    deadlock if other threads required something to be imported before
    completing initialization.  This can be a big problem for ZEO.
    
    The only foreseen risk is that external scripts which "import Zope"
    may depend in some way on the database being opened immediately.  Most
    scripts just use "Zope.app()", which still works well.  If you have a
    script that breaks with these changes, either add a call to the new
    Zope.startup() function or set the ZOPE_COMPATIBLE_STARTUP environment
    variable to a non-empty value.
    bd241196
z2.py 30.7 KB