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
be755881
Commit
be755881
authored
Mar 17, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more logging
parent
ceb54c2d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
25 deletions
+14
-25
libcaf_core/caf/detail/stream_distribution_tree.hpp
libcaf_core/caf/detail/stream_distribution_tree.hpp
+14
-25
No files found.
libcaf_core/caf/detail/stream_distribution_tree.hpp
View file @
be755881
...
@@ -22,11 +22,10 @@
...
@@ -22,11 +22,10 @@
#include <memory>
#include <memory>
#include <unordered_map>
#include <unordered_map>
#include "caf/
broadcast_downstream_mana
ger.hpp"
#include "caf/
log
ger.hpp"
#include "caf/ref_counted.hpp"
#include "caf/ref_counted.hpp"
#include "caf/scheduled_actor.hpp"
#include "caf/scheduled_actor.hpp"
#include "caf/stream_manager.hpp"
#include "caf/stream_manager.hpp"
#include "caf/stream_stage.hpp"
namespace
caf
{
namespace
caf
{
namespace
detail
{
namespace
detail
{
...
@@ -80,39 +79,25 @@ public:
...
@@ -80,39 +79,25 @@ public:
return
policy_
;
return
policy_
;
}
}
void
close_remote_input
();
// -- Overridden member functions of `stream_manager` ------------------------
/// Terminates the core actor with log output `log_message` if `at_end`
/// returns `true`.
/*
void shutdown_if_at_end(const char* log_message) {
CAF_IGNORE_UNUSED(log_message);
if (policy_.at_end()) {
CAF_LOG_DEBUG(log_message);
self_->quit(caf::exit_reason::user_shutdown);
}
}
*/
// -- overridden member functions of `stream_manager` ------------------------
// -- overridden member functions of `stream_manager` ------------------------
void
handle
(
inbound_path
*
path
,
downstream_msg
::
batch
&
x
)
override
{
void
handle
(
inbound_path
*
path
,
downstream_msg
::
batch
&
x
)
override
{
CAF_LOG_TRACE
(
CAF_ARG
(
x
));
CAF_LOG_TRACE
(
CAF_ARG
(
path
)
<<
CAF_ARG
(
x
));
auto
slot
=
path
->
slots
.
receiver
;
auto
slot
=
path
->
slots
.
receiver
;
policy_
.
before_handle_batch
(
slot
,
path
->
hdl
);
policy_
.
before_handle_batch
(
slot
,
path
->
hdl
);
policy_
.
handle_batch
(
slot
,
path
->
hdl
,
x
.
xs
);
policy_
.
handle_batch
(
slot
,
path
->
hdl
,
x
.
xs
);
policy_
.
after_handle_batch
(
slot
,
path
->
hdl
);
policy_
.
after_handle_batch
(
slot
,
path
->
hdl
);
}
}
void
handle
(
inbound_path
*
from
,
downstream_msg
::
close
&
)
override
{
void
handle
(
inbound_path
*
path
,
downstream_msg
::
close
&
x
)
override
{
policy_
.
path_closed
(
from
->
slots
.
receiver
);
CAF_LOG_TRACE
(
CAF_ARG
(
path
)
<<
CAF_ARG
(
x
));
CAF_IGNORE_UNUSED
(
x
);
policy_
.
path_closed
(
path
->
slots
.
receiver
);
}
}
void
handle
(
inbound_path
*
from
,
downstream_msg
::
forced_close
&
x
)
override
{
void
handle
(
inbound_path
*
path
,
downstream_msg
::
forced_close
&
x
)
override
{
policy_
.
path_force_closed
(
from
->
slots
.
receiver
,
x
.
reason
);
CAF_LOG_TRACE
(
CAF_ARG
(
path
)
<<
CAF_ARG
(
x
));
policy_
.
path_force_closed
(
path
->
slots
.
receiver
,
x
.
reason
);
}
}
bool
handle
(
stream_slots
slots
,
upstream_msg
::
ack_open
&
x
)
override
{
bool
handle
(
stream_slots
slots
,
upstream_msg
::
ack_open
&
x
)
override
{
...
@@ -127,13 +112,17 @@ public:
...
@@ -127,13 +112,17 @@ public:
return
false
;
return
false
;
}
}
void
handle
(
stream_slots
slots
,
upstream_msg
::
drop
&
)
override
{
void
handle
(
stream_slots
slots
,
upstream_msg
::
drop
&
x
)
override
{
CAF_LOG_TRACE
(
CAF_ARG
(
slots
)
<<
CAF_ARG
(
x
));
CAF_IGNORE_UNUSED
(
x
);
auto
slot
=
slots
.
receiver
;
auto
slot
=
slots
.
receiver
;
if
(
out
().
remove_path
(
slots
.
receiver
,
none
,
true
))
if
(
out
().
remove_path
(
slots
.
receiver
,
none
,
true
))
policy_
.
path_dropped
(
slot
);
policy_
.
path_dropped
(
slot
);
}
}
void
handle
(
stream_slots
slots
,
upstream_msg
::
forced_drop
&
x
)
override
{
void
handle
(
stream_slots
slots
,
upstream_msg
::
forced_drop
&
x
)
override
{
CAF_LOG_TRACE
(
CAF_ARG
(
slots
)
<<
CAF_ARG
(
x
));
CAF_IGNORE_UNUSED
(
x
);
auto
slot
=
slots
.
receiver
;
auto
slot
=
slots
.
receiver
;
if
(
out
().
remove_path
(
slots
.
receiver
,
x
.
reason
,
true
))
if
(
out
().
remove_path
(
slots
.
receiver
,
x
.
reason
,
true
))
policy_
.
path_force_dropped
(
slot
,
x
.
reason
);
policy_
.
path_force_dropped
(
slot
,
x
.
reason
);
...
...
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