IoImpl::IoImpl()
{
piface_ = new s4u::Io(this);
+ actor::ActorImpl* self = actor::ActorImpl::self();
+ if (self) {
+ set_actor(self);
+ self->activities_.emplace_back(this);
+ }
}
IoImpl& IoImpl::set_sharing_penalty(double sharing_penalty)
disk_->get_host()->get_netpoint()->get_englobing_zone()->get_disk_model()->io_start(disk_, size_, type_);
surf_action_->set_sharing_penalty(sharing_penalty_);
surf_action_->set_activity(this);
+ start_time_ = surf_action_->get_start_time();
XBT_DEBUG("Create IO synchro %p %s", this, get_cname());
switch (state_) {
case State::FAILED:
issuer->context_->set_wannadie();
- piface_->complete(s4u::Activity::State::FAILED);
+ static_cast<s4u::Io*>(get_iface())->complete(s4u::Activity::State::FAILED);
issuer->exception_ = std::make_exception_ptr(StorageFailureException(XBT_THROW_POINT, "Storage failed"));
break;
case State::CANCELED: