if someone called wakeup() within the last 7 lines then the selector will already wake up, will it not? this could benefit from a comment …