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
452231bd
Commit
452231bd
authored
Apr 20, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
a7038dc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
cppa/detail/abstract_scheduled_actor.hpp
cppa/detail/abstract_scheduled_actor.hpp
+15
-4
No files found.
cppa/detail/abstract_scheduled_actor.hpp
View file @
452231bd
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
#ifndef SCHEDULED_ACTOR_HPP
#ifndef SCHEDULED_ACTOR_HPP
#define SCHEDULED_ACTOR_HPP
#define SCHEDULED_ACTOR_HPP
#include <iostream>
#include <atomic>
#include <atomic>
#include "cppa/any_tuple.hpp"
#include "cppa/any_tuple.hpp"
...
@@ -136,7 +138,13 @@ class abstract_scheduled_actor : public abstract_actor<scheduled_actor>
...
@@ -136,7 +138,13 @@ class abstract_scheduled_actor : public abstract_actor<scheduled_actor>
bool
pending_enqueue
(
actor
*
sender
,
any_tuple
msg
)
bool
pending_enqueue
(
actor
*
sender
,
any_tuple
msg
)
{
{
return
enqueue_node
(
super
::
fetch_node
(
sender
,
std
::
move
(
msg
)),
pending
);
//return enqueue_node(super::fetch_node(sender, std::move(msg)), pending);
if
(
enqueue_node
(
super
::
fetch_node
(
sender
,
std
::
move
(
msg
)),
pending
))
{
std
::
cout
<<
"PENDING ENQUEUE SUCCESSFULL
\n
"
;
return
true
;
}
return
false
;
}
}
void
quit
(
std
::
uint32_t
reason
)
void
quit
(
std
::
uint32_t
reason
)
...
@@ -181,16 +189,19 @@ class abstract_scheduled_actor : public abstract_actor<scheduled_actor>
...
@@ -181,16 +189,19 @@ class abstract_scheduled_actor : public abstract_actor<scheduled_actor>
if
(
m_state
.
compare_exchange_weak
(
state
,
target_state
))
if
(
m_state
.
compare_exchange_weak
(
state
,
target_state
))
{
{
CPPA_REQUIRE
(
this
->
m_scheduler
!=
nullptr
);
CPPA_REQUIRE
(
this
->
m_scheduler
!=
nullptr
);
this
->
m_scheduler
->
enqueue
(
this
);
if
(
target_state
==
ready
)
{
this
->
m_scheduler
->
enqueue
(
this
);
}
return
true
;
return
true
;
}
}
break
;
break
;
}
}
case
about_to_block
:
case
about_to_block
:
{
{
if
(
m_state
.
compare_exchange_weak
(
state
,
target_state
))
if
(
m_state
.
compare_exchange_weak
(
state
,
ready
))
{
{
return
tru
e
;
return
fals
e
;
}
}
break
;
break
;
}
}
...
...
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