Commit 66e53f85 authored by neverlord's avatar neverlord

reformatting

parent b32ac7c9
......@@ -51,8 +51,19 @@ class yielding_actor : public abstract_scheduled_actor
typedef abstract_scheduled_actor super;
util::fiber m_fiber;
std::function<void()> m_behavior;
public:
yielding_actor(std::function<void()> fun);
void dequeue(behavior& bhvr); //override
void dequeue(partial_function& fun); //override
void resume(util::fiber* from, scheduler::callback* callback); //override
private:
typedef std::unique_ptr<recursive_queue_node> queue_node_ptr;
static void run(void* _this);
......@@ -105,20 +116,8 @@ class yielding_actor : public abstract_scheduled_actor
};
public:
yielding_actor(std::function<void()> fun);
void dequeue(behavior& bhvr); //override
void dequeue(partial_function& fun); //override
void resume(util::fiber* from, scheduler::callback* callback); //override
private:
typedef std::unique_ptr<recursive_queue_node> queue_node_ptr;
util::fiber m_fiber;
std::function<void()> m_behavior;
nestable_invoke_policy<filter_policy> m_invoke;
};
......
......@@ -110,10 +110,10 @@ void yielding_actor::dequeue(behavior& bhvr)
auto& fun = bhvr.get_partial_function();
if (bhvr.timeout().valid() == false)
{
dequeue(fun);
return;
// suppress virtual function call
yielding_actor::dequeue(fun);
}
if (m_invoke.invoke_from_cache(fun) == false)
else if (m_invoke.invoke_from_cache(fun) == false)
{
request_timeout(bhvr.timeout());
bool timeout_occured = 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