Skip to content

rdp: Sort main loop events by probability of least signalled first

Quoting the commit message here:

For performance reasons, the events to wait for are supposed to be
sorted in a way, that the least likely signalled events are sorted
before the events, that are signalled a lot.
When WaitForMultipleObjects() returns and an event was signalled, it
returns the index of the signalled event with the lowest index.
Currently, the returned index is unused, since the cause of spurious
event signals with WinPR events is not known yet.
However, regardless of this, do the first preparation step and already
sort the WinPR events to wait for accordingly.

Merge request reports