A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Activity refactoring
[simgrid.git]
/
src
/
s4u
/
s4u_Comm.cpp
diff --git
a/src/s4u/s4u_Comm.cpp
b/src/s4u/s4u_Comm.cpp
index
c58896f
..
2b4bcd6
100644
(file)
--- a/
src/s4u/s4u_Comm.cpp
+++ b/
src/s4u/s4u_Comm.cpp
@@
-23,12
+23,6
@@
xbt::signal<void(Comm const&)> Comm::on_send;
xbt::signal<void(Comm const&)> Comm::on_recv;
xbt::signal<void(Comm const&)> Comm::on_completion;
xbt::signal<void(Comm const&)> Comm::on_recv;
xbt::signal<void(Comm const&)> Comm::on_completion;
-void Comm::complete(Activity::State state)
-{
- Activity::complete(state);
- on_completion(*this);
-}
-
Comm::~Comm()
{
if (state_ == State::STARTED && not detached_ &&
Comm::~Comm()
{
if (state_ == State::STARTED && not detached_ &&
@@
-163,6
+157,7
@@
CommPtr Comm::set_payload_size(uint64_t bytes)
CommPtr Comm::sendto_init(Host* from, Host* to)
{
CommPtr res(new Comm());
CommPtr Comm::sendto_init(Host* from, Host* to)
{
CommPtr res(new Comm());
+ res->sender_ = kernel::actor::ActorImpl::self();
res->from_ = from;
res->to_ = to;
res->from_ = from;
res->to_ = to;
@@
-212,8
+207,11
@@
Comm* Comm::start()
if (suspended_)
pimpl_->suspend();
if (suspended_)
pimpl_->suspend();
- if (not detached_)
- static_cast<kernel::activity::CommImpl*>(pimpl_.get())->set_iface(this);
+ if (not detached_) {
+ pimpl_->set_iface(this);
+ pimpl_->set_actor(sender_);
+ }
+
state_ = State::STARTED;
return this;
}
state_ = State::STARTED;
return this;
}