- /* If the suspended actor is waiting on a sync, suspend its synchronization. */
- if (waiting_synchro == nullptr) {
- auto exec = new activity::ExecImpl();
- exec->set_name("suspend").set_host(host_).set_flops_amount(0.0).start();
- waiting_synchro = activity::ExecImplPtr(exec);
-
- waiting_synchro->simcalls_.push_back(&simcall);
- }
- waiting_synchro->suspend();
+ /* If the suspended actor is waiting on a sync, suspend its synchronization.
+ * Otherwise, it will suspend itself when scheduled, ie, very soon. */
+ if (waiting_synchro_ != nullptr)
+ waiting_synchro_->suspend();