This looks a bit racy to me. You could potentially be calling `cond.signal` before the other thread calls `cond.wait`. I would add a small sleep here.