Periodically wake up the thread in monitor::wait
There is a small window where a thread can go to sleep in
Monitor::wait after releasing the lock but before another thread
notifies the monitor and updates the on-deck thread.
A simple approach to fix this problem is to wake-up the Monitor::wait
every 10 milliseconds and check if it is on-deck.
Change-Id: I4b9abda89d1fc653cdae2b4c84cdda01efde1cf2
[ROCm/clr commit: 5079410c94]
Tá an tiomantas seo le fáil i:
1 tuismitheoir
d0b6c2b538
tiomantas
0f18c47edd
3 comhad athraithe
+39
-2
Níor tháinig aon chomhaid le do chuardach
@@ -251,7 +251,7 @@ void Monitor::wait() {
|
||||
}
|
||||
// now go to sleep
|
||||
else {
|
||||
suspend.wait();
|
||||
suspend.timedWait(10);
|
||||
}
|
||||
spinCount++;
|
||||
}
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir