On Mon Nov 13 14:56:51 2023 +0000, Yuxuan Shui wrote:
not supported
not sure what you mean by that? I can build it fine with mingw-w64-g++ and it runs.
cancellation does not work
this is not true. callback could still be called after MFCancelWorkItem returns success, the [documentation](https://learn.microsoft.com/en-us/windows/win32/api/mfapi/nf-mfapi-mfcancelw...) says as much. and the thing is, more than this "hit race" case, our current rtworkq implementation triggers a assert in threadpool that says exactly what i predicted (callback is running when you try to close it). and that's exactly the race I am trying to avoid here. what more proof do you want?
i hope you understand the problem here. the problem is not the assert, so doesn't matter if the TP implementation handles this case.
the problem is if the `scheduled_item_cancelable_callback` is running when we reaches `queue_cancel_item`, we will double release the work item.