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
6a846488
Commit
6a846488
authored
Apr 27, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant state
parent
85c82d8c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
libcaf_io/caf/io/network/test_multiplexer.hpp
libcaf_io/caf/io/network/test_multiplexer.hpp
+0
-4
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+5
-7
libcaf_io/src/multiplexer.cpp
libcaf_io/src/multiplexer.cpp
+3
-1
libcaf_io/src/test_multiplexer.cpp
libcaf_io/src/test_multiplexer.cpp
+0
-1
No files found.
libcaf_io/caf/io/network/test_multiplexer.hpp
View file @
6a846488
...
@@ -367,10 +367,6 @@ private:
...
@@ -367,10 +367,6 @@ private:
pending_endpoints_map
pending_endpoints_
;
pending_endpoints_map
pending_endpoints_
;
datagram_data_map
datagram_data_
;
datagram_data_map
datagram_data_
;
// extra state for making sure the test multiplexer is not used in a
// multithreaded setup
std
::
thread
::
id
tid_
;
// Configures shortcuts for runnables.
// Configures shortcuts for runnables.
size_t
inline_runnables_
;
size_t
inline_runnables_
;
...
...
libcaf_io/src/middleman.cpp
View file @
6a846488
...
@@ -294,13 +294,11 @@ void middleman::start() {
...
@@ -294,13 +294,11 @@ void middleman::start() {
// Launch backend.
// Launch backend.
if
(
system_
.
config
().
middleman_detach_multiplexer
)
if
(
system_
.
config
().
middleman_detach_multiplexer
)
backend_supervisor_
=
backend
().
make_supervisor
();
backend_supervisor_
=
backend
().
make_supervisor
();
if
(
!
backend_supervisor_
)
{
// The only backend that returns a `nullptr` by default is the
// The only backend that returns a `nullptr` is the `test_multiplexer`
// `test_multiplexer` which does not have its own thread but uses the main
// which does not have its own thread but uses the main thread instead.
// thread instead. Other backends can set `middleman_detach_multiplexer` to
// Other backends can set `middleman_detach_multiplexer` to false to
// false to suppress creation of the supervisor.
// suppress creation of the supervisor.
if
(
backend_supervisor_
!=
nullptr
)
{
backend
().
thread_id
(
std
::
this_thread
::
get_id
());
}
else
{
std
::
atomic
<
bool
>
init_done
{
false
};
std
::
atomic
<
bool
>
init_done
{
false
};
std
::
mutex
mtx
;
std
::
mutex
mtx
;
std
::
condition_variable
cv
;
std
::
condition_variable
cv
;
...
...
libcaf_io/src/multiplexer.cpp
View file @
6a846488
...
@@ -23,7 +23,9 @@ namespace caf {
...
@@ -23,7 +23,9 @@ namespace caf {
namespace
io
{
namespace
io
{
namespace
network
{
namespace
network
{
multiplexer
::
multiplexer
(
actor_system
*
sys
)
:
execution_unit
(
sys
)
{
multiplexer
::
multiplexer
(
actor_system
*
sys
)
:
execution_unit
(
sys
),
tid_
(
std
::
this_thread
::
get_id
())
{
// nop
// nop
}
}
...
...
libcaf_io/src/test_multiplexer.cpp
View file @
6a846488
...
@@ -72,7 +72,6 @@ test_multiplexer::datagram_data::
...
@@ -72,7 +72,6 @@ test_multiplexer::datagram_data::
test_multiplexer
::
test_multiplexer
(
actor_system
*
sys
)
test_multiplexer
::
test_multiplexer
(
actor_system
*
sys
)
:
multiplexer
(
sys
),
:
multiplexer
(
sys
),
tid_
(
std
::
this_thread
::
get_id
()),
inline_runnables_
(
0
),
inline_runnables_
(
0
),
servant_ids_
(
0
)
{
servant_ids_
(
0
)
{
CAF_ASSERT
(
sys
!=
nullptr
);
CAF_ASSERT
(
sys
!=
nullptr
);
...
...
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