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
51840609
Commit
51840609
authored
Sep 16, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store max_throughput parameter in MM
parent
e11edafb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
20 deletions
+13
-20
libcaf_core/caf/local_actor.hpp
libcaf_core/caf/local_actor.hpp
+0
-2
libcaf_core/src/local_actor.cpp
libcaf_core/src/local_actor.cpp
+0
-11
libcaf_io/caf/io/middleman.hpp
libcaf_io/caf/io/middleman.hpp
+6
-0
libcaf_io/src/abstract_broker.cpp
libcaf_io/src/abstract_broker.cpp
+3
-6
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+4
-1
No files found.
libcaf_core/caf/local_actor.hpp
View file @
51840609
...
...
@@ -594,8 +594,6 @@ public:
behavior
&
fun
,
message_id
awaited_response
);
//invoke_message_result invoke_message(mailbox_element_ptr& node);
using
pending_response
=
std
::
pair
<
message_id
,
behavior
>
;
message_id
new_request_id
(
message_priority
mp
);
...
...
libcaf_core/src/local_actor.cpp
View file @
51840609
...
...
@@ -485,17 +485,6 @@ invoke_message_result local_actor::invoke_message(mailbox_element_ptr& ptr,
CAF_CRITICAL
(
"invalid message type"
);
}
/*
invoke_message_result local_actor::invoke_message(mailbox_element_ptr& node) {
if (! awaits_response() && bhvr_stack().empty())
return im_dropped;
auto& bhvr = awaits_response() ? awaited_response_handler()
: bhvr_stack().back();
auto mid = awaited_response_id();
return invoke_message(node, bhvr, mid);
}
*/
struct
pending_response_predicate
{
public:
explicit
pending_response_predicate
(
message_id
mid
)
:
mid_
(
mid
)
{
...
...
libcaf_io/caf/io/middleman.hpp
View file @
51840609
...
...
@@ -137,6 +137,10 @@ public:
middleman
(
const
backend_factory
&
);
inline
size_t
max_throughput
()
const
{
return
max_throughput_
;
}
/// @endcond
private:
...
...
@@ -154,6 +158,8 @@ private:
hook_uptr
hooks_
;
// actor offering asyncronous IO by managing this singleton instance
middleman_actor
manager_
;
// stores the max_throughput parameter from the scheduler coordinator
size_t
max_throughput_
;
};
}
// namespace io
...
...
libcaf_io/src/abstract_broker.cpp
View file @
51840609
...
...
@@ -21,8 +21,6 @@
#include "caf/config.hpp"
#include "caf/make_counted.hpp"
#include "caf/scheduler/abstract_coordinator.hpp"
#include "caf/io/broker.hpp"
#include "caf/io/middleman.hpp"
...
...
@@ -47,11 +45,10 @@ public:
inline
void
operator
()()
{
CAF_PUSH_AID
(
self_
->
id
());
CAF_LOG_TRACE
(
""
);
auto
sc
=
detail
::
singletons
::
get_scheduling_coordinator
();
if
(
self_
->
resume
(
nullptr
,
sc
->
max_throughput
())
==
resume_later
)
{
// re-schedule broker
auto
mt
=
self_
->
parent
().
max_throughput
();
// re-schedule broker if it reached its maximum message throughput
if
(
self_
->
resume
(
nullptr
,
mt
)
==
resumable
::
resume_later
)
self_
->
backend
().
post
(
std
::
move
(
*
this
));
}
}
private:
...
...
libcaf_io/src/middleman.cpp
View file @
51840609
...
...
@@ -39,9 +39,10 @@
#include "caf/io/middleman.hpp"
#include "caf/io/basp_broker.hpp"
#include "caf/io/system_messages.hpp"
#include "caf/io/network/interfaces.hpp"
#include "caf/scheduler/abstract_coordinator.hpp"
#include "caf/detail/logging.hpp"
#include "caf/detail/ripemd_160.hpp"
#include "caf/detail/safe_equal.hpp"
...
...
@@ -248,6 +249,8 @@ void middleman::add_broker(broker_ptr bptr) {
void
middleman
::
initialize
()
{
CAF_LOG_TRACE
(
""
);
auto
sc
=
detail
::
singletons
::
get_scheduling_coordinator
();
max_throughput_
=
sc
->
max_throughput
();
backend_supervisor_
=
backend_
->
make_supervisor
();
if
(
backend_supervisor_
==
nullptr
)
{
// the only backend that returns a `nullptr` is the `test_multiplexer`
...
...
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