Idle: don't wake up event loop on duplicate event

This commit is contained in:
Max Kellermann 2013-01-16 23:24:58 +01:00
parent 36c814d26e
commit 2bb01093c0

View File

@ -52,9 +52,10 @@ idle_add(unsigned flags)
{
assert(flags != 0);
idle_flags |= flags;
unsigned old_flags = idle_flags.fetch_or(flags);
GlobalEvents::Emit(GlobalEvents::IDLE);
if ((old_flags & flags) != flags)
GlobalEvents::Emit(GlobalEvents::IDLE);
}
unsigned