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.
This commit is contained in:
Tamás Bálint Misius 2019-04-17 09:50:41 +02:00
parent 5810a19dbc
commit e1d32c9352
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -125,12 +125,12 @@ void Gravity::gravity_update_async()
signal_grav = true;
}
}
}
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));
membwand(gravx, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned));