Calling condition.wait() inside thread causes retrieval of any future to block on main thread
In your ReentrantReadWriteLock
class, try changing
self._condition = Condition()
In your ReentrantReadWriteLock
class, try changing
self._condition = Condition()