Yeah, that would be in part 2 or 3 of the series :smile: We can probably just go ahead and get rid of the spinning entirely but I preferred to put the least controversial stuff at the front and get rid of most of the CPU cycles waste by the end of the first part. As I remember it, I didn't find downsides to just never spinning at the time, but then I recently found some other place in wined3d where maybe spinning a bit before waiting is a good idea. I'll reevaluate all that after this MR is done with.
Agreed, I was definitely going to sign off on the commit anyway, I just wanted to know what the way forward from there looked like.
Except that Sleep(0) and NtYieldExecution() basically do the same thing right now (I had forgot how the whole NtDelayExecution() / NtYieldExecution() thing went). NtDelayExecution(TRUE, ...) / server_wait() or similar seems a bit heavy handed here and I'm not sure we have any interesting alternative.
Yeah, so right now the choice is I think between sched_yield() and select(0). I don't have an understanding of the problem so I don't know which one we want. I'll leave it to your testing, assuming you can come up with interesting results :-)