Commit e2832362 authored by Dominik Charousset's avatar Dominik Charousset

become no longer execs self->exec_behavior_stack

the automatic invocation of self->exec_behavior_stack unfortunately
breaks `sync_send(...).then(...).continue_with(...)`
parent d75ca6d0
......@@ -36,6 +36,7 @@
#include "cppa/on.hpp"
#include "cppa/atom.hpp"
#include "cppa/logging.hpp"
#include "cppa/behavior.hpp"
#include "cppa/match_expr.hpp"
#include "cppa/message_id.hpp"
......@@ -67,6 +68,7 @@ class message_future {
behavior cpy = ref;
ref = cpy.add_continuation(std::move(fun));
}
else CPPA_LOG_WARNING(".continue_with: failed to add continuation");
}
private:
......
......@@ -117,7 +117,6 @@ class stacked : public Base {
void become_impl(behavior&& bhvr, bool discard_old, message_id mid) {
auto dthis = util::dptr<Subtype>(this);
bool exec_afterwards = dthis->m_bhvr_stack.empty();
if (bhvr.timeout().valid()) {
dthis->reset_timeout();
dthis->request_timeout(bhvr.timeout());
......@@ -126,7 +125,6 @@ class stacked : public Base {
dthis->m_bhvr_stack.pop_async_back();
}
dthis->m_bhvr_stack.push_back(std::move(bhvr), mid);
if (exec_afterwards) dthis->exec_behavior_stack();
}
};
......
......@@ -702,6 +702,7 @@ int main() {
self->quit();
}
);
self->exec_behavior_stack();
CPPA_ERROR("line " << __LINE__ << " should be unreachable");
}
catch (actor_exited&) {
......
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