Commit 59a2be32 authored by Joseph Noir's avatar Joseph Noir

Fix reference count for detachted actors

Fixes #166
parent 02a55afa
...@@ -73,10 +73,7 @@ class no_scheduling { ...@@ -73,10 +73,7 @@ class no_scheduling {
std::thread([=] { std::thread([=] {
CAF_PUSH_AID(mself->id()); CAF_PUSH_AID(mself->id());
CAF_LOG_TRACE(""); CAF_LOG_TRACE("");
for (;;) { while (mself->resume(nullptr, 0) != resumable::done) {
if (mself->resume(nullptr, 0) == resumable::done) {
return;
}
// await new data before resuming actor // await new data before resuming actor
await_data(mself.get()); await_data(mself.get());
CAF_REQUIRE(self->mailbox().blocked() == false); CAF_REQUIRE(self->mailbox().blocked() == false);
......
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