Thanks, my patch did extend this API, unfortunately in this scenario SDL is still controlling the runloop so there is no opportunity to process events from other sources, and my app only occasionally displays a UI.
I wonder if you could share some code of how that looks like.
I’m asking because I am currently investigating an issue in my Windows app related to Dispatch, and my hunch is that the RunLoop (or rather, its integration with the Windows message loop) is the problem.
The minimum time-out value for Win32 SetTimer is 10ms (USER_TIMER_MINIMUM - 0x0000000A).
Looking at your code, it appears that RunLoop.main.limitDate is called only once per timer (i.e., at least every 10ms). If messages accumulate in large quantities, delays are expected to gradually increase significantly.
1 Like