Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
doc: a ref cannot be nullptr
[simgrid.git] / src / s4u / s4u_Barrier.cpp
index e4a8214ab0bf65e215974f5d3502c89c4ceee169..f1e449be69a5b56c53822914e3f76bfc042011f7 100644 (file)
@@ -39,8 +39,8 @@ int Barrier::wait()
   XBT_DEBUG("waiting %p %u/%u", this, arrived_actors_, expected_actors_);
   if (arrived_actors_ == expected_actors_) {
     cond_->notify_all();
-    mutex_->unlock();
     arrived_actors_ = 0;
+    mutex_->unlock();
     return SG_BARRIER_SERIAL_THREAD;
   }