tests: fix occasional deadlock when a threaded unit test ends
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()'
Showing
Please register or sign in to comment