Remove use of WaitHandle

This commit is contained in:
Travis Nickles 2018-07-26 01:10:53 -05:00
parent 40341ac709
commit 4cfbc098b0

View File

@ -139,12 +139,13 @@ namespace DS4Windows
private static void singleAppComThread_DoWork()
{
WaitHandle[] waitHandles = new WaitHandle[] { threadComEvent };
//WaitHandle[] waitHandles = new WaitHandle[] { threadComEvent };
while (!exitComThread)
{
// check every second for a signal.
if (WaitHandle.WaitAny(waitHandles) == 0)
//if (WaitHandle.WaitAny(waitHandles) == 0)
if (threadComEvent.WaitOne())
{
threadComEvent.Reset();
// The user tried to start another instance. We can't allow that,