Which blocking threading operations in .NET will handle COM messages when blocked?

懵懂的女人 提交于 2019-12-06 02:26:25

This can be reverse-engineered somewhat from the SSCLI20 source, albeit that it is dated. The core CLR function that implements MsgWaitForMultipleHandles is DoAppropriateWait. From what I see, it is used by AutoResetEvent, ManualResetEvent and Semaphore but not by Mutex. One quirk is that WaitHandle.WaitAny is okay from an STA thread but WaitAll() generates an exception. Yeah, this isn't documented anywhere other then a few hints in Chris Brumme's blog. You can't assume too much from what I found, test this to be sure.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!