Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the addition of detached comms to maestro
authorFabien Chaix <chaix@ics.forth.gr>
Wed, 18 May 2022 14:26:28 +0000 (17:26 +0300)
committerFabien Chaix <chaix@ics.forth.gr>
Wed, 18 May 2022 14:33:06 +0000 (17:33 +0300)
src/kernel/activity/CommImpl.cpp

index 143ebf8..87e8c5e 100644 (file)
@@ -112,6 +112,7 @@ CommImpl& CommImpl::set_dst_buff(unsigned char* buff, size_t* size)
 CommImpl& CommImpl::detach()
 {
   detached_ = true;
+  EngineImpl::get_instance()->get_maestro()->activities_.emplace_back(this);
   return *this;
 }
 
@@ -266,7 +267,6 @@ ActivityImplPtr CommImpl::isend(actor::CommIsendSimcall* observer)
   if (observer->is_detached()) {
     other_comm->detach();
     other_comm->clean_fun = observer->get_clean_fun();
-    EngineImpl::get_instance()->get_maestro()->activities_.emplace_back(other_comm);
   } else {
     other_comm->clean_fun = nullptr;
     observer->get_issuer()->activities_.emplace_back(other_comm);