On Wed Mar 13 14:49:51 2024 +0000, Zhiyi Zhang wrote:
I meant to test that MFCancelWorkItem() is a blocking call. Not to test the race condition. You can create a work item that fires an event after it gets started and then Sleeps(1s). And you wait for the event to be fired in the main thread, then call MFCancelWorkItem(), and time it and check if it takes ~1s for MFCancelWorkItem() to finish.
@zhiyi In that case neither windows or wine blocks.