From e1d32c9352f091ce5f7881449988b3cfcbfc2a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Wed, 17 Apr 2019 09:50:41 +0200 Subject: [PATCH] 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. --- src/simulation/Gravity.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index ac4ce6f05..1c119bbb2 100755 --- a/src/simulation/Gravity.cpp +++ b/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));