Set limit on wait time in TwoWayReentrantReadWriteLock

Signed-off-by: Ross Allan <rallanpcl@gmail.com>