Description
One mistake that's easy to make is accidentally sleeping in the context of an RPC reactor thread. To catch this type of bug we should introduce a wrapper for usleep() which, in debug mode, checks some threadlocal "is_sleep_allowed" variable and FATALs on the reactor threads.