SimGrid (3.17) UNRELEASED (release target: September 22 2017)
S4U
- - start and forget about isend comms with detach()
+ - Comm.detach(): start and forget about asynchronous emission
+ - this_actor::send(mailbox) is now mailbox->put()
SimGrid (3.16) Released June 22. 2017.
state_ = started;
}
void Comm::wait() {
- xbt_assert(state_ == started || state_ == inited);
+ xbt_assert(state_ == started || state_ == inited || state_ == finished);
+
+ if (state_ == finished)
+ return;
if (state_ == started)
simcall_comm_wait(pimpl_, -1/*timeout*/);
}
void Comm::wait(double timeout) {
- xbt_assert(state_ == started || state_ == inited);
+ xbt_assert(state_ == started || state_ == inited || state_ == finished);
+
+ if (state_ == finished)
+ return;
if (state_ == started) {
simcall_comm_wait(pimpl_, timeout);
commPimpl->cancel();
}
-bool Comm::test() {
+bool Comm::test()
+{
xbt_assert(state_ == inited || state_ == started || state_ == finished);
if (state_ == finished) {
return false;
}
+MailboxPtr Comm::mailbox()
+{
+ return mailbox_;
+}
+
void intrusive_ptr_release(simgrid::s4u::Comm* c)
{
if (c->refcount_.fetch_sub(1, std::memory_order_release) == 1) {