mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Do not wait for threads falling asleep
I cannot see any reason to do this. Even this is not enough to fix theoretical race case on Windows which doesn't seem to cause any problems in practice anyhow Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
12feb5866f
commit
c974d9ef33
1 changed files with 1 additions and 4 deletions
|
@ -2960,12 +2960,9 @@ namespace {
|
|||
// This makes the threads to go to sleep
|
||||
AllThreadsShouldSleep = true;
|
||||
|
||||
// Wait for the threads to be all sleeping and reset flags
|
||||
// to a known state.
|
||||
// Reset flags to a known state.
|
||||
for (int i = 1; i < ActiveThreads; i++)
|
||||
{
|
||||
while (threads[i].state != THREAD_SLEEPING);
|
||||
|
||||
// This flag can be in a random state
|
||||
threads[i].printCurrentLineRequest = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue