Skip to content
Permalink
Browse files

Move notification out of block locking associated mutex in Gravity.cpp

I don't know how it ended up inside, I wanted it outside. For the record,
signalling the CV while the associated mutex is locked is a pessimisation,
it just yields predictable scheduling.
  • Loading branch information...
LBPHacker committed Apr 17, 2019
1 parent 5810a19 commit e1d32c9352f091ce5f7881449988b3cfcbfc2a84
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/simulation/Gravity.cpp
@@ -125,11 +125,11 @@ void Gravity::gravity_update_async()
signal_grav = true;
}
}
}

if (signal_grav)
{
gravcv.notify_one();
}
if (signal_grav)
{
gravcv.notify_one();
}
//Apply the gravity mask
membwand(gravy, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned));

0 comments on commit e1d32c9

Please sign in to comment.
You can’t perform that action at this time.