Avoid crashing the HTML logger when called from a non-D thread.
Call the idle handler after each round of event processing while handling yield()ed tasks.