Fix bug that hogs cpu upon wake from sleep

Okay, so I will admit now that it is a bad idea to reset
a mutable dictionary this way. It seemed clever initially,
but clearly this causes the main thread to hang because
this operation will never finish.