[nas] AuHandleEvents performance once more
hanke at volny.cz
Sun Nov 21 06:11:05 MST 2004
Good afternoon everyone,
I'd like to ask about the intended behavior of the AuHandleEvents()
function. There is nothing specific about how exactly it works in the
documentation, but from the example programs and from an earlier
post here in the conference, I thought that it should block the
execution of the program until next event arrives.
So I have AuSoundPlayFromData() in one thread and this code
in another one.
However, I get like a 40% CPU load and additional debugging message
inside the loop reveals that this really is a busy wait.
AuHandleEvents() gets called every few miliseconds, *even if no sound
is being played and have not been during the whole execution of
the program so far*.
So I'd like to ask if AuHandleEvents() really is blocking under some
circumstances. If not, please is there a blocking alternative?
More information about the Nas