Skip to content

Commit

Permalink
better use of CPPA_REQUIRE in no_scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverlord committed Apr 19, 2014
1 parent f15bba6 commit ca53837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cppa/policy/no_scheduling.hpp
Expand Up @@ -76,9 +76,9 @@ class no_scheduling {

template<class Actor>
void launch(Actor* self, execution_unit*) {
CPPA_REQUIRE(self != nullptr);
CPPA_PUSH_AID(self->id());
CPPA_LOG_TRACE(CPPA_ARG(self));
CPPA_REQUIRE(self != nullptr);
intrusive_ptr<Actor> mself{self};
self->attach_to_scheduler();
std::thread([=] {
Expand All @@ -91,6 +91,7 @@ class no_scheduling {
}
// await new data before resuming actor
await_data(mself.get());
CPPA_REQUIRE(self->mailbox().blocked() == false);
}
self->detach_from_scheduler();
}).detach();
Expand Down

0 comments on commit ca53837

Please sign in to comment.