- /* 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();