Hot loop hogs CPU

Fixed a hot loop that hogged CPU usage at 100% for the dispatcher thread.
Fix tested under Debian Squeeze and Mac OS X 10.7