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
5c8b2b3b
Commit
5c8b2b3b
authored
Oct 30, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add is_stopped_flag and fix formatting
parent
91d22051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
libcaf_core/caf/stream_manager.hpp
libcaf_core/caf/stream_manager.hpp
+17
-8
No files found.
libcaf_core/caf/stream_manager.hpp
View file @
5c8b2b3b
...
...
@@ -51,6 +51,10 @@ public:
/// buffered elements.
static
constexpr
int
is_shutting_down_flag
=
0x0002
;
/// Denotes whether the manager has already stopped. Calling member functions
/// such as stop() or abort() on it no longer has any effect.
static
constexpr
int
is_stopped_flag
=
0x0004
;
// -- member types -----------------------------------------------------------
using
inbound_paths_list
=
std
::
vector
<
inbound_path
*>
;
...
...
@@ -148,16 +152,21 @@ public:
return
getf
(
is_shutting_down_flag
);
}
/// Returns whether this manager has already stopped.
bool
stopped
()
const
noexcept
{
return
getf
(
is_stopped_flag
);
}
/// Returns whether this stream remains open even if no in- or outbound paths
/// exist. The default is `false`. Does not keep a source alive past the
/// point where its driver returns `done() == true`.
inline
bool
continuous
()
const
noexcept
{
bool
continuous
()
const
noexcept
{
return
getf
(
is_continuous_flag
);
}
/// Sets whether this stream remains open even if no in- or outbound paths
/// exist.
inline
void
continuous
(
bool
x
)
noexcept
{
void
continuous
(
bool
x
)
noexcept
{
if
(
!
shutting_down
())
{
if
(
x
)
setf
(
is_continuous_flag
);
...
...
@@ -167,7 +176,7 @@ public:
}
/// Returns the list of inbound paths.
inline
const
inbound_paths_list
&
inbound_paths
()
const
noexcept
{
const
inbound_paths_list
&
inbound_paths
()
const
noexcept
{
return
inbound_paths_
;
}
...
...
@@ -179,7 +188,7 @@ public:
bool
inbound_paths_idle
()
const
noexcept
;
/// Returns the parent actor.
inline
scheduled_actor
*
self
()
{
scheduled_actor
*
self
()
{
return
self_
;
}
...
...
@@ -265,7 +274,7 @@ public:
/// Adds the current sender as an inbound path.
/// @pre Current message is an `open_stream_msg`.
stream_slot
add_unchecked_inbound_path_impl
(
rtti_pair
rtti
);
stream_slot
add_unchecked_inbound_path_impl
(
rtti_pair
rtti
);
protected:
// -- modifiers for self -----------------------------------------------------
...
...
@@ -322,9 +331,9 @@ private:
flags_
=
x
&
~
flag
;
}
bool
getf
(
int
flag
)
const
noexcept
{
return
(
flags_
&
flag
)
!=
0
;
}
bool
getf
(
int
flag
)
const
noexcept
{
return
(
flags_
&
flag
)
!=
0
;
}
};
/// A reference counting pointer to a `stream_manager`.
...
...
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