문제

Will close() signal all the threads that have called WaitOne()?

If not, what's the best way to do this?

도움이 되었습니까?

해결책 2

It will cause an AbandonedMutexException. The correct way of using this class is not to call close while waiters are active.

See http://msdn.microsoft.com/en-us/library/58195swd.aspx

다른 팁

No. It will cause the WaitOne() method to fail with an exception, ObjectDisposedException in particular.

The only "best way" is to not do this, it is a plain bug. EventWaitHandle objects should only ever be closed or disposed when they are no longer used.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top