Added step to dispose the keyboard hook object (#4449)

This commit is contained in:
Arjun Balgovind
2020-06-23 17:19:36 -07:00
committed by GitHub
parent ca99f60964
commit 2104a1250e
3 changed files with 21 additions and 1 deletions

View File

@@ -25,6 +25,12 @@ KeyboardHook::KeyboardHook(
KeyboardHook::~KeyboardHook()
{
quit = true;
// Notify the DispatchProc thread so that it isn't stuck at the Wait step
Monitor::Enter(queue);
Monitor::Pulse(queue);
Monitor::Exit(queue);
kbEventDispatch->Join();
// Unregister low level hook procedure