Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
66e53f85
Commit
66e53f85
authored
Apr 19, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformatting
parent
b32ac7c9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
cppa/detail/yielding_actor.hpp
cppa/detail/yielding_actor.hpp
+15
-16
src/yielding_actor.cpp
src/yielding_actor.cpp
+3
-3
No files found.
cppa/detail/yielding_actor.hpp
View file @
66e53f85
...
...
@@ -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
;
};
...
...
src/yielding_actor.cpp
View file @
66e53f85
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment