Is this backwards? Shouldn't we wake the worker when we set NEED_SWITCH, not the other way?