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
b490caff
Commit
b490caff
authored
Apr 02, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in scheduled_actor::init
this patch allows actors to send a message to themselves in `init()`
parent
4ab4e0f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/scheduled_actor.cpp
src/scheduled_actor.cpp
+2
-2
No files found.
src/scheduled_actor.cpp
View file @
b490caff
...
...
@@ -43,6 +43,7 @@ scheduled_actor::scheduled_actor(actor_state init_state, bool chained_send)
void
scheduled_actor
::
attach_to_scheduler
(
scheduler
*
sched
,
bool
hidden
)
{
CPPA_REQUIRE
(
sched
!=
nullptr
);
m_scheduler
=
sched
;
m_hidden
=
hidden
;
// init is called by the spawning actor, manipulate self to
// point to this actor
...
...
@@ -52,7 +53,6 @@ void scheduled_actor::attach_to_scheduler(scheduler* sched, bool hidden) {
catch
(...)
{
}
// make sure scheduler is not set until init() is done
std
::
atomic_thread_fence
(
std
::
memory_order_seq_cst
);
m_scheduler
=
sched
;
}
bool
scheduled_actor
::
initialized
()
const
{
...
...
@@ -95,7 +95,7 @@ bool scheduled_actor::enqueue(actor_state next_state,
mailbox_element
*
e
)
{
CPPA_REQUIRE
(
next_state
==
actor_state
::
ready
||
next_state
==
actor_state
::
pending
);
CPPA_REQUIRE
(
e
->
marked
==
false
);
CPPA_REQUIRE
(
e
!=
nullptr
&&
e
->
marked
==
false
);
switch
(
m_mailbox
.
enqueue
(
e
))
{
case
intrusive
:
:
first_enqueued
:
{
auto
state
=
m_state
.
load
();
...
...
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