Try getting around wait yet again

This commit is contained in:
Travis Nickles 2017-03-25 01:29:25 -07:00
parent 9ec41b207a
commit 82c3d4beff

View File

@ -328,12 +328,13 @@ namespace DS4Windows
try try
{ {
exitOutputThread = true; exitOutputThread = true;
lock (outputReport) /*lock (outputReport)
{ {
Monitor.PulseAll(outputReport); Monitor.PulseAll(outputReport);
} }
*/
//ds4Output.Interrupt(); ds4Output.Interrupt();
ds4Output.Join(); ds4Output.Join();
} }
catch (Exception e) catch (Exception e)
@ -359,6 +360,8 @@ namespace DS4Windows
private void performDs4Output() private void performDs4Output()
{ {
lock (outputReport) lock (outputReport)
{
try
{ {
int lastError = 0; int lastError = 0;
while (!exitOutputThread) while (!exitOutputThread)
@ -395,6 +398,11 @@ namespace DS4Windows
} }
} }
} }
catch (ThreadInterruptedException)
{
}
}
} }
/** Is the device alive and receiving valid sensor input reports? */ /** Is the device alive and receiving valid sensor input reports? */