native_event_waiter.h
1 #pragma once 2 #include "pch.h" 3 #include "common/interop/shared_constants.h" 4 5 class NativeEventWaiter 6 { 7 static const int timeout = 1000; 8 9 HANDLE event_handle = nullptr; 10 std::function<void()> action = nullptr; 11 std::atomic<bool> aborting = false; 12 13 void run(); 14 std::thread running_thread; 15 16 public: 17 NativeEventWaiter(const std::wstring& event_name, std::function<void()> action); 18 ~NativeEventWaiter(); 19 };