Open
Description
Consider this:
struct event_and_watcher {
wil::unique_event eventName;
wil::unique_event_watcher watcher;
};
event_and_watcher make_event_watcher(wchar_t const* name, void (*pfn)()) {
event_and_watcher retval;
if (retval.eventName.try_open(name, SYNCHRONIZE)) {
retval.watcher = wil::make_event_watcher(retval.eventName.get(), pfn);
}
return retval;
}
auto g_w = make_event_watcher(L"AnotherEventName", [] { ReactToEvent(); });
When the event is signaled and the TP wait callback is invoked here:
Lines 3915 to 3924 in 6f60a1b
... the ResetEvent fails with a failfast:
Lines 2502 to 2505 in 6f60a1b
... because I don't have Reset rights, only Synchronize.
Consider a policy flag to make that Reset optional.
Activity