G
Guest
The MSDN documentation for this states:
The wait thread uses the Win32 WaitForMultipleObjects function to monitor registered wait operations. Therefore, if you must use the same native operating system handle in multiple calls to RegisterWaitForSingleObject, you must duplicate the handle using the Win32 DuplicateHandle function. Note that you should not pulse an event object passed to RegisterWaitForSingleObject, because the wait thread might not detect that the event is signaled before it is reset.
My question is what constitutes a "native operating system handle". If I call ThreadPool.RegisterWaitForSingleObject twice each time with the same ManualResetEvent does this constitute using the "same native operating system handle"?
Just trying to avoid problems with my code in the future.
Thanks,
- Chris Tanger
The wait thread uses the Win32 WaitForMultipleObjects function to monitor registered wait operations. Therefore, if you must use the same native operating system handle in multiple calls to RegisterWaitForSingleObject, you must duplicate the handle using the Win32 DuplicateHandle function. Note that you should not pulse an event object passed to RegisterWaitForSingleObject, because the wait thread might not detect that the event is signaled before it is reset.
My question is what constitutes a "native operating system handle". If I call ThreadPool.RegisterWaitForSingleObject twice each time with the same ManualResetEvent does this constitute using the "same native operating system handle"?
Just trying to avoid problems with my code in the future.
Thanks,
- Chris Tanger