The self-pipe trick<http://cr.yp.to/docs/selfpipe.html>,
implemented using a pair of sockets rather than pipes (due to the lack of
support in select() on Windows for pipes), used to wake up the main loop
from another thread.