From a80f153ae2ee4fb49cf810bab7ae88a04dcc32b5 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Thu, 31 Jan 2013 18:45:16 +0100 Subject: [PATCH] add assertions to check for state_running --- include/boost/fiber/detail/fiber_object.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/fiber/detail/fiber_object.hpp b/include/boost/fiber/detail/fiber_object.hpp index bb03b8b3..4d41624c 100644 --- a/include/boost/fiber/detail/fiber_object.hpp +++ b/include/boost/fiber/detail/fiber_object.hpp @@ -244,7 +244,9 @@ public: { set_ready(); suspend(); + BOOST_ASSERT( is_running() ); fn_(); + BOOST_ASSERT( is_running() ); } catch ( forced_unwind const&) {} @@ -339,6 +341,9 @@ public: set_ready(); suspend(); fn_(); + BOOST_ASSERT( is_running() ); + fn_(); + BOOST_ASSERT( is_running() ); } catch ( forced_unwind const&) {}