Commit a0de91c7 authored by neverlord's avatar neverlord

maintenance

parent e83f6d6a
......@@ -53,6 +53,7 @@
#include "cppa/util/enable_if.hpp"
#include "cppa/util/disable_if.hpp"
#include "cppa/detail/actor_count.hpp"
#include "cppa/detail/get_behavior.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)
*/
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 @@
namespace cppa {
// forward declarations
//class local_actor;
class actor_behavior;
class scheduler_helper;
//local_actor* self();
/**
* @brief
*/
......@@ -38,22 +34,17 @@ class scheduler
scheduler();
/**
* @brief Calls {@link context::exit(std::uint32_t) context::exit}.
*/
void exit_context(local_actor* ctx, std::uint32_t reason);
public:
virtual ~scheduler();
/**
* @warning Always call super::start on overriding.
* @warning Always call scheduler::start on overriding.
*/
virtual void start();
/**
* @warning Always call super::stop on overriding.
* @warning Always call scheduler::stop on overriding.
*/
virtual void stop();
......@@ -79,13 +70,6 @@ class scheduler
*/
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>
void future_send(const actor_ptr& to,
const Duration& rel_time, const Data&... data)
......
......@@ -153,11 +153,6 @@ channel* scheduler::future_send_helper()
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)
{
if (what)
......@@ -173,11 +168,6 @@ attachable* scheduler::register_hidden_context()
return new exit_observer;
}
void scheduler::exit_context(local_actor* ctx, std::uint32_t reason)
{
ctx->quit(reason);
}
void set_scheduler(scheduler* sched)
{
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