- if (req->inspector_ != nullptr)
- return req->inspector_->is_enabled();
-
- using simix::Simcall;
- switch (req->call_) {
- case Simcall::NONE:
- return false;
-
- case Simcall::COMM_WAIT: {
- /* FIXME: check also that src and dst processes are not suspended */
- const kernel::activity::CommImpl* act = simcall_comm_wait__getraw__comm(req);
-
- if (act->src_timeout_ || act->dst_timeout_) {
- /* If it has a timeout it will be always be enabled (regardless of who declared the timeout),
- * because even if the communication is not ready, it can timeout and won't block. */
- if (_sg_mc_timeout == 1)
- return true;
- }
- /* On the other hand if it hasn't a timeout, check if the comm is ready.*/
- else if (act->detached() && act->src_actor_ == nullptr &&
- act->type_ == simgrid::kernel::activity::CommImpl::Type::READY)
- return (act->dst_actor_ != nullptr);
- return (act->src_actor_ && act->dst_actor_);
- }