Commit a0de91c7 authored by neverlord's avatar neverlord

maintenance

parent e83f6d6a
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "cppa/util/enable_if.hpp" #include "cppa/util/enable_if.hpp"
#include "cppa/util/disable_if.hpp" #include "cppa/util/disable_if.hpp"
#include "cppa/detail/actor_count.hpp"
#include "cppa/detail/get_behavior.hpp" #include "cppa/detail/get_behavior.hpp"
#include "cppa/detail/receive_loop_helper.hpp" #include "cppa/detail/receive_loop_helper.hpp"
...@@ -601,7 +602,7 @@ void future_send(actor_ptr whom, const Duration& rel_time, const Data&... data) ...@@ -601,7 +602,7 @@ void future_send(actor_ptr whom, const Duration& rel_time, const Data&... data)
*/ */
inline void await_all_others_done() inline void await_all_others_done()
{ {
get_scheduler()->await_others_done(); detail::actor_count_wait_until((unchecked_self() == nullptr) ? 0 : 1);
} }
/** /**
......
...@@ -16,14 +16,10 @@ ...@@ -16,14 +16,10 @@
namespace cppa { namespace cppa {
// forward declarations
//class local_actor; //class local_actor;
class actor_behavior; class actor_behavior;
class scheduler_helper; class scheduler_helper;
//local_actor* self();
/** /**
* @brief * @brief
*/ */
...@@ -38,22 +34,17 @@ class scheduler ...@@ -38,22 +34,17 @@ class scheduler
scheduler(); scheduler();
/**
* @brief Calls {@link context::exit(std::uint32_t) context::exit}.
*/
void exit_context(local_actor* ctx, std::uint32_t reason);
public: public:
virtual ~scheduler(); virtual ~scheduler();
/** /**
* @warning Always call super::start on overriding. * @warning Always call scheduler::start on overriding.
*/ */
virtual void start(); virtual void start();
/** /**
* @warning Always call super::stop on overriding. * @warning Always call scheduler::stop on overriding.
*/ */
virtual void stop(); virtual void stop();
...@@ -79,13 +70,6 @@ class scheduler ...@@ -79,13 +70,6 @@ class scheduler
*/ */
virtual attachable* register_hidden_context(); virtual attachable* register_hidden_context();
/**
* @brief Wait until all other actors finished execution.
* @warning This function causes a deadlock if it's called from
* more than one actor.
*/
virtual void await_others_done();
template<typename Duration, typename... Data> template<typename Duration, typename... Data>
void future_send(const actor_ptr& to, void future_send(const actor_ptr& to,
const Duration& rel_time, const Data&... data) const Duration& rel_time, const Data&... data)
......
...@@ -153,11 +153,6 @@ channel* scheduler::future_send_helper() ...@@ -153,11 +153,6 @@ channel* scheduler::future_send_helper()
return m_helper->m_worker.get(); return m_helper->m_worker.get();
} }
void scheduler::await_others_done()
{
detail::actor_count_wait_until((unchecked_self() == nullptr) ? 0 : 1);
}
void scheduler::register_converted_context(local_actor* what) void scheduler::register_converted_context(local_actor* what)
{ {
if (what) if (what)
...@@ -173,11 +168,6 @@ attachable* scheduler::register_hidden_context() ...@@ -173,11 +168,6 @@ attachable* scheduler::register_hidden_context()
return new exit_observer; return new exit_observer;
} }
void scheduler::exit_context(local_actor* ctx, std::uint32_t reason)
{
ctx->quit(reason);
}
void set_scheduler(scheduler* sched) void set_scheduler(scheduler* sched)
{ {
if (detail::singleton_manager::set_scheduler(sched) == false) if (detail::singleton_manager::set_scheduler(sched) == 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