Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'udpor-phase4' into 'master'
[simgrid.git] / src / xbt / OsSemaphore.hpp
index 6582689..821075f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -22,7 +22,7 @@ public:
 
   inline void release()
   {
-    std::unique_lock lock(mutex_);
+    const std::scoped_lock lock(mutex_);
     ++capa_;
     condition_.notify_one();
   }