Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
69c57acf
Commit
69c57acf
authored
Oct 21, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize worker hub
parent
b56f485f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
libcaf_net/caf/net/basp/application.hpp
libcaf_net/caf/net/basp/application.hpp
+7
-0
libcaf_net/src/application.cpp
libcaf_net/src/application.cpp
+2
-0
No files found.
libcaf_net/caf/net/basp/application.hpp
View file @
69c57acf
...
...
@@ -26,8 +26,11 @@
#include <vector>
#include "caf/actor_addr.hpp"
#include "caf/actor_system.hpp"
#include "caf/actor_system_config.hpp"
#include "caf/byte.hpp"
#include "caf/callback.hpp"
#include "caf/defaults.hpp"
#include "caf/detail/worker_hub.hpp"
#include "caf/error.hpp"
#include "caf/net/basp/connection_state.hpp"
...
...
@@ -80,6 +83,10 @@ public:
// Allow unit tests to run the application without endpoint manager.
if
(
!
std
::
is_base_of
<
test_tag
,
Parent
>::
value
)
manager_
=
&
parent
.
manager
();
auto
workers
=
get_or
(
system_
->
config
(),
"middleman.workers"
,
defaults
::
middleman
::
workers
);
for
(
size_t
i
=
0
;
i
<
workers
;
++
i
)
hub_
->
add_new_worker
(
*
queue_
,
proxies_
);
// Write handshake.
auto
hdr
=
parent
.
next_header_buffer
();
auto
payload
=
parent
.
next_buffer
();
...
...
libcaf_net/src/application.cpp
View file @
69c57acf
...
...
@@ -252,6 +252,8 @@ error application::handle_handshake(packet_writer&, header hdr,
error
application
::
handle_actor_message
(
packet_writer
&
,
header
hdr
,
byte_span
payload
)
{
auto
worker
=
hub_
->
pop
();
// TODO: This copy is nessecary because the worker interface expects a buffer
// type...
buffer_type
buf
(
payload
.
begin
(),
payload
.
end
());
if
(
worker
!=
nullptr
)
{
CAF_LOG_DEBUG
(
"launch BASP worker for deserializing an actor_message"
);
...
...
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