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
a0de91c7
Commit
a0de91c7
authored
Nov 15, 2011
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maintenance
parent
e83f6d6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
29 deletions
+4
-29
cppa/cppa.hpp
cppa/cppa.hpp
+2
-1
cppa/scheduler.hpp
cppa/scheduler.hpp
+2
-18
src/scheduler.cpp
src/scheduler.cpp
+0
-10
No files found.
cppa/cppa.hpp
View file @
a0de91c7
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#include "cppa/util/enable_if.hpp"
#include "cppa/util/enable_if.hpp"
#include "cppa/util/disable_if.hpp"
#include "cppa/util/disable_if.hpp"
#include "cppa/detail/actor_count.hpp"
#include "cppa/detail/get_behavior.hpp"
#include "cppa/detail/get_behavior.hpp"
#include "cppa/detail/receive_loop_helper.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)
...
@@ -601,7 +602,7 @@ void future_send(actor_ptr whom, const Duration& rel_time, const Data&... data)
*/
*/
inline
void
await_all_others_done
()
inline
void
await_all_others_done
()
{
{
get_scheduler
()
->
await_others_done
(
);
detail
::
actor_count_wait_until
((
unchecked_self
()
==
nullptr
)
?
0
:
1
);
}
}
/**
/**
...
...
cppa/scheduler.hpp
View file @
a0de91c7
...
@@ -16,14 +16,10 @@
...
@@ -16,14 +16,10 @@
namespace
cppa
{
namespace
cppa
{
// forward declarations
//class local_actor;
//class local_actor;
class
actor_behavior
;
class
actor_behavior
;
class
scheduler_helper
;
class
scheduler_helper
;
//local_actor* self();
/**
/**
* @brief
* @brief
*/
*/
...
@@ -38,22 +34,17 @@ class scheduler
...
@@ -38,22 +34,17 @@ class scheduler
scheduler
();
scheduler
();
/**
* @brief Calls {@link context::exit(std::uint32_t) context::exit}.
*/
void
exit_context
(
local_actor
*
ctx
,
std
::
uint32_t
reason
);
public:
public:
virtual
~
scheduler
();
virtual
~
scheduler
();
/**
/**
* @warning Always call s
up
er::start on overriding.
* @warning Always call s
chedul
er::start on overriding.
*/
*/
virtual
void
start
();
virtual
void
start
();
/**
/**
* @warning Always call s
up
er::stop on overriding.
* @warning Always call s
chedul
er::stop on overriding.
*/
*/
virtual
void
stop
();
virtual
void
stop
();
...
@@ -79,13 +70,6 @@ class scheduler
...
@@ -79,13 +70,6 @@ class scheduler
*/
*/
virtual
attachable
*
register_hidden_context
();
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
>
template
<
typename
Duration
,
typename
...
Data
>
void
future_send
(
const
actor_ptr
&
to
,
void
future_send
(
const
actor_ptr
&
to
,
const
Duration
&
rel_time
,
const
Data
&
...
data
)
const
Duration
&
rel_time
,
const
Data
&
...
data
)
...
...
src/scheduler.cpp
View file @
a0de91c7
...
@@ -153,11 +153,6 @@ channel* scheduler::future_send_helper()
...
@@ -153,11 +153,6 @@ channel* scheduler::future_send_helper()
return
m_helper
->
m_worker
.
get
();
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
)
void
scheduler
::
register_converted_context
(
local_actor
*
what
)
{
{
if
(
what
)
if
(
what
)
...
@@ -173,11 +168,6 @@ attachable* scheduler::register_hidden_context()
...
@@ -173,11 +168,6 @@ attachable* scheduler::register_hidden_context()
return
new
exit_observer
;
return
new
exit_observer
;
}
}
void
scheduler
::
exit_context
(
local_actor
*
ctx
,
std
::
uint32_t
reason
)
{
ctx
->
quit
(
reason
);
}
void
set_scheduler
(
scheduler
*
sched
)
void
set_scheduler
(
scheduler
*
sched
)
{
{
if
(
detail
::
singleton_manager
::
set_scheduler
(
sched
)
==
false
)
if
(
detail
::
singleton_manager
::
set_scheduler
(
sched
)
==
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