* Refactor.

select() out, ConditionVariable in. -17 LOC. Everything in the sleep loop is
wrapped in synchronize, making it easy to see there are no races. Finally, it
looks more readable.