Commit ebc98f92 authored by Matthias Vallentin's avatar Matthias Vallentin Committed by Marian Triebe

Remove monitoring when workers leave a pool

parent 27168d27
...@@ -183,6 +183,9 @@ bool actor_pool::filter(upgrade_lock<detail::shared_spinlock>& guard, ...@@ -183,6 +183,9 @@ bool actor_pool::filter(upgrade_lock<detail::shared_spinlock>& guard,
auto last = workers_.end(); auto last = workers_.end();
auto i = std::find(workers_.begin(), last, what); auto i = std::find(workers_.begin(), last, what);
if (i != last) { if (i != last) {
default_attachable::observe_token tk{address(),
default_attachable::monitor};
what->detach(tk);
workers_.erase(i); workers_.erase(i);
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment