Explorar el Código

pdevs/multithreading: optimize transition send

Eric Ramat hace 3 años
padre
commit
db4b4b025d
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      src/artis-star/kernel/pdevs/multithreading/Coordinator.hpp

+ 6 - 2
src/artis-star/kernel/pdevs/multithreading/Coordinator.hpp

@@ -228,8 +228,12 @@ public:
     if (_received > 0) {
       std::unique_lock <std::mutex> lock(_received_mutex);
 
-      type::_graph_manager.transition(receivers, t);
-      type::_graph_manager.transition(IMM, t);
+      if (not receivers.empty()) {
+        type::_graph_manager.transition(receivers, t);
+      }
+      if (not IMM.empty()) {
+        type::_graph_manager.transition(IMM, t);
+      }
       _condition.wait(lock);
     }