• Julien Muchembled's avatar
    tests: fix occasional deadlock when a threaded unit test ends · e96e8f0b
    Julien Muchembled authored
    During 'NEOCluster.stop', there's often 1 'Serialized.background()' call too
    many, and when it removed the last lock of the queue, another thread would hang
    if was sleeping between 'q.put(lock)' and 'q.get().release()'.
    
    An easy way to reproduce the bug was to add:
        if cls.pending is None:
            time.sleep(.01)
    just before 'q.get().release()'
    e96e8f0b
__init__.py 17.8 KB