I put that assert there for a reason, Fedor. If events==0, it means the other thread wakes up the event loop unnecessarily.