From ca538378e9079750708fb9e19a294073feb29d6d Mon Sep 17 00:00:00 2001 From: Dominik Charousset Date: Sun, 20 Apr 2014 01:23:11 +0200 Subject: [PATCH] better use of CPPA_REQUIRE in no_scheduling --- cppa/policy/no_scheduling.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cppa/policy/no_scheduling.hpp b/cppa/policy/no_scheduling.hpp index e0771fe8d1..c95bf0fec2 100644 --- a/cppa/policy/no_scheduling.hpp +++ b/cppa/policy/no_scheduling.hpp @@ -76,9 +76,9 @@ class no_scheduling { template 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 mself{self}; self->attach_to_scheduler(); std::thread([=] { @@ -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();