• Arnaud Fontaine's avatar
    ZODB Components: Fix deadlock on import lock. · 3181d5ad
    Arnaud Fontaine authored
    Since a29456bc, only import lock is used instead of aq_method_lock, dynamic
    modules locks and import lock. However, it was creating another deadlock:
    
    when the import lock is held in one thread (for instance when trying to
    perform migration to Portal Type as Classes and ZODB Property Sheets), and an
    object is loaded from ZODB, a request is sent to ZEO, and this blocks until
    another thread (asyncore) gets the ZEO reply and sends it back to the first
    thread.
    
    However, if the asyncore thread receives an Exception, it will tries to import
    its module and thus create a deadlock as the import lock is still held by the
    first thread.
    3181d5ad