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
220f1ac3
Commit
220f1ac3
authored
Nov 19, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #974
parents
2cb70865
20a148fc
Changes
66
Hide whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
103 additions
and
103 deletions
+103
-103
CMakeLists.txt
CMakeLists.txt
+2
-2
doc/tex/CommonPitfalls.tex
doc/tex/CommonPitfalls.tex
+1
-1
examples/broker/simple_broker.cpp
examples/broker/simple_broker.cpp
+1
-1
examples/remoting/distributed_calculator.cpp
examples/remoting/distributed_calculator.cpp
+1
-1
libcaf_core/caf/abstract_actor.hpp
libcaf_core/caf/abstract_actor.hpp
+2
-2
libcaf_core/caf/actor_profiler.hpp
libcaf_core/caf/actor_profiler.hpp
+1
-1
libcaf_core/caf/actor_system.hpp
libcaf_core/caf/actor_system.hpp
+2
-2
libcaf_core/caf/all.hpp
libcaf_core/caf/all.hpp
+3
-3
libcaf_core/caf/binary_deserializer.hpp
libcaf_core/caf/binary_deserializer.hpp
+1
-1
libcaf_core/caf/data_processor.hpp
libcaf_core/caf/data_processor.hpp
+1
-1
libcaf_core/caf/detail/delegate_serialize.hpp
libcaf_core/caf/detail/delegate_serialize.hpp
+1
-1
libcaf_core/caf/detail/invoke_result_visitor.hpp
libcaf_core/caf/detail/invoke_result_visitor.hpp
+1
-1
libcaf_core/caf/detail/is_one_of.hpp
libcaf_core/caf/detail/is_one_of.hpp
+1
-1
libcaf_core/caf/detail/is_primitive_config_value.hpp
libcaf_core/caf/detail/is_primitive_config_value.hpp
+1
-1
libcaf_core/caf/detail/set_thread_name.hpp
libcaf_core/caf/detail/set_thread_name.hpp
+1
-1
libcaf_core/caf/detail/type_list.hpp
libcaf_core/caf/detail/type_list.hpp
+2
-2
libcaf_core/caf/detail/type_traits.hpp
libcaf_core/caf/detail/type_traits.hpp
+7
-7
libcaf_core/caf/fused_downstream_manager.hpp
libcaf_core/caf/fused_downstream_manager.hpp
+1
-1
libcaf_core/caf/intrusive/lifo_inbox.hpp
libcaf_core/caf/intrusive/lifo_inbox.hpp
+3
-3
libcaf_core/caf/logger.hpp
libcaf_core/caf/logger.hpp
+3
-3
libcaf_core/caf/make_config_option.hpp
libcaf_core/caf/make_config_option.hpp
+1
-1
libcaf_core/caf/memory_managed.hpp
libcaf_core/caf/memory_managed.hpp
+1
-1
libcaf_core/caf/message.hpp
libcaf_core/caf/message.hpp
+1
-1
libcaf_core/caf/message_builder.hpp
libcaf_core/caf/message_builder.hpp
+1
-1
libcaf_core/caf/monitorable_actor.hpp
libcaf_core/caf/monitorable_actor.hpp
+1
-1
libcaf_core/caf/parser_state.hpp
libcaf_core/caf/parser_state.hpp
+1
-1
libcaf_core/caf/pec.hpp
libcaf_core/caf/pec.hpp
+1
-1
libcaf_core/caf/policy/work_stealing.hpp
libcaf_core/caf/policy/work_stealing.hpp
+3
-3
libcaf_core/caf/spawn_options.hpp
libcaf_core/caf/spawn_options.hpp
+7
-7
libcaf_core/caf/stateful_actor.hpp
libcaf_core/caf/stateful_actor.hpp
+1
-1
libcaf_core/caf/string_view.hpp
libcaf_core/caf/string_view.hpp
+2
-2
libcaf_core/caf/typed_behavior.hpp
libcaf_core/caf/typed_behavior.hpp
+1
-1
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+3
-3
libcaf_core/src/config_option_set.cpp
libcaf_core/src/config_option_set.cpp
+1
-1
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+1
-1
libcaf_core/src/message.cpp
libcaf_core/src/message.cpp
+1
-1
libcaf_core/src/replies_to.cpp
libcaf_core/src/replies_to.cpp
+1
-1
libcaf_core/src/scheduled_actor.cpp
libcaf_core/src/scheduled_actor.cpp
+2
-2
libcaf_core/src/string_view.cpp
libcaf_core/src/string_view.cpp
+1
-1
libcaf_core/test/actor_lifetime.cpp
libcaf_core/test/actor_lifetime.cpp
+1
-1
libcaf_core/test/handles.cpp
libcaf_core/test/handles.cpp
+1
-1
libcaf_core/test/intrusive_ptr.cpp
libcaf_core/test/intrusive_ptr.cpp
+1
-1
libcaf_core/test/ipv4_subnet.cpp
libcaf_core/test/ipv4_subnet.cpp
+1
-1
libcaf_core/test/ipv6_subnet.cpp
libcaf_core/test/ipv6_subnet.cpp
+1
-1
libcaf_core/test/logger.cpp
libcaf_core/test/logger.cpp
+1
-1
libcaf_core/test/make_config_value_field.cpp
libcaf_core/test/make_config_value_field.cpp
+2
-2
libcaf_core/test/native_streaming_classes.cpp
libcaf_core/test/native_streaming_classes.cpp
+1
-1
libcaf_core/test/policy/categorized.cpp
libcaf_core/test/policy/categorized.cpp
+2
-2
libcaf_core/test/request_timeout.cpp
libcaf_core/test/request_timeout.cpp
+3
-3
libcaf_io/caf/io/basp/all.hpp
libcaf_io/caf/io/basp/all.hpp
+3
-3
libcaf_io/caf/io/basp/header.hpp
libcaf_io/caf/io/basp/header.hpp
+1
-1
libcaf_io/caf/io/basp/instance.hpp
libcaf_io/caf/io/basp/instance.hpp
+2
-2
libcaf_io/caf/io/basp/worker.hpp
libcaf_io/caf/io/basp/worker.hpp
+1
-1
libcaf_io/caf/io/middleman.hpp
libcaf_io/caf/io/middleman.hpp
+1
-1
libcaf_io/caf/io/network/acceptor.hpp
libcaf_io/caf/io/network/acceptor.hpp
+1
-1
libcaf_io/caf/io/network/datagram_handler.hpp
libcaf_io/caf/io/network/datagram_handler.hpp
+1
-1
libcaf_io/caf/policy/tcp.hpp
libcaf_io/caf/policy/tcp.hpp
+2
-2
libcaf_io/src/io/network/default_multiplexer.cpp
libcaf_io/src/io/network/default_multiplexer.cpp
+1
-1
libcaf_io/src/io/network/native_socket.cpp
libcaf_io/src/io/network/native_socket.cpp
+1
-1
libcaf_io/test/io/receive_buffer.cpp
libcaf_io/test/io/receive_buffer.cpp
+1
-1
libcaf_test/caf/test/dsl.hpp
libcaf_test/caf/test/dsl.hpp
+1
-1
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+1
-1
libcaf_test/caf/test/unit_test_impl.hpp
libcaf_test/caf/test/unit_test_impl.hpp
+1
-1
scripts/caf-prof
scripts/caf-prof
+2
-2
scripts/obs-commit-version.sh
scripts/obs-commit-version.sh
+1
-1
tools/caf-vec.cpp
tools/caf-vec.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
220f1ac3
...
@@ -415,7 +415,7 @@ add_custom_command(TARGET uninstall
...
@@ -415,7 +415,7 @@ add_custom_command(TARGET uninstall
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
)
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
)
################################################################################
################################################################################
# set inclu
e paths for subprojects
#
# set inclu
de paths for subprojects
#
################################################################################
################################################################################
# path to caf core & io headers
# path to caf core & io headers
...
@@ -480,7 +480,7 @@ endmacro()
...
@@ -480,7 +480,7 @@ endmacro()
macro
(
add_optional_caf_binaries name
)
macro
(
add_optional_caf_binaries name
)
string
(
TOUPPER
${
name
}
upper_name
)
string
(
TOUPPER
${
name
}
upper_name
)
set
(
dependency_failed no
)
set
(
dependency_failed no
)
# check all aditional dependency flags
# check all ad
d
itional dependency flags
foreach
(
flag_name
${
ARGN
}
)
foreach
(
flag_name
${
ARGN
}
)
if
(
${
flag_name
}
)
if
(
${
flag_name
}
)
set
(
dependency_failed yes
)
set
(
dependency_failed yes
)
...
...
doc/tex/CommonPitfalls.tex
View file @
220f1ac3
...
@@ -60,5 +60,5 @@ behavior that is incredibly hard to find and debug. However, sharing
...
@@ -60,5 +60,5 @@ behavior that is incredibly hard to find and debug. However, sharing
and its lifetime is guaranteed to outlive all actors. The simplest way to meet
and its lifetime is guaranteed to outlive all actors. The simplest way to meet
the lifetime guarantee is by storing the data in smart pointers such as
the lifetime guarantee is by storing the data in smart pointers such as
\lstinline
^
std::shared
_
ptr
^
. Nevertheless, the recommended way of sharing
\lstinline
^
std::shared
_
ptr
^
. Nevertheless, the recommended way of sharing
information
s
is message passing. Sending the same message to multiple actors
information is message passing. Sending the same message to multiple actors
does not result in copying the data several times.
does not result in copying the data several times.
examples/broker/simple_broker.cpp
View file @
220f1ac3
...
@@ -103,7 +103,7 @@ void read_int(const void* data, uint64_t& storage) {
...
@@ -103,7 +103,7 @@ void read_int(const void* data, uint64_t& storage) {
storage
=
first
|
(
static_cast
<
uint64_t
>
(
second
)
<<
sizeof
(
uint32_t
));
storage
=
first
|
(
static_cast
<
uint64_t
>
(
second
)
<<
sizeof
(
uint32_t
));
}
}
// implemenation of our broker
// implemen
t
ation of our broker
behavior
broker_impl
(
broker
*
self
,
connection_handle
hdl
,
const
actor
&
buddy
)
{
behavior
broker_impl
(
broker
*
self
,
connection_handle
hdl
,
const
actor
&
buddy
)
{
// we assume io_fsm manages a broker with exactly one connection,
// we assume io_fsm manages a broker with exactly one connection,
// i.e., the connection ponted to by `hdl`
// i.e., the connection ponted to by `hdl`
...
...
examples/remoting/distributed_calculator.cpp
View file @
220f1ac3
...
@@ -75,7 +75,7 @@ behavior calculator_fun() {
...
@@ -75,7 +75,7 @@ behavior calculator_fun() {
namespace
client
{
namespace
client
{
// a simple calculat
e
r task: operation + operands
// a simple calculat
o
r task: operation + operands
struct
task
{
struct
task
{
atom_value
op
;
atom_value
op
;
int
lhs
;
int
lhs
;
...
...
libcaf_core/caf/abstract_actor.hpp
View file @
220f1ac3
...
@@ -81,7 +81,7 @@ public:
...
@@ -81,7 +81,7 @@ public:
virtual
void
attach
(
attachable_ptr
ptr
)
=
0
;
virtual
void
attach
(
attachable_ptr
ptr
)
=
0
;
/// Convenience function that attaches the functor `f` to this actor. The
/// Convenience function that attaches the functor `f` to this actor. The
/// actor executes `f()` on exit or immediat
le
y if it is not running.
/// actor executes `f()` on exit or immediat
el
y if it is not running.
template
<
class
F
>
template
<
class
F
>
void
attach_functor
(
F
f
)
{
void
attach_functor
(
F
f
)
{
attach
(
attachable_ptr
{
new
detail
::
functor_attachable
<
F
>
(
std
::
move
(
f
))});
attach
(
attachable_ptr
{
new
detail
::
functor_attachable
<
F
>
(
std
::
move
(
f
))});
...
@@ -222,7 +222,7 @@ protected:
...
@@ -222,7 +222,7 @@ protected:
mutable
std
::
mutex
mtx_
;
mutable
std
::
mutex
mtx_
;
private:
private:
// prohibit copies, assigments, and heap allocations
// prohibit copies, assig
n
ments, and heap allocations
void
*
operator
new
(
size_t
);
void
*
operator
new
(
size_t
);
void
*
operator
new
[](
size_t
);
void
*
operator
new
[](
size_t
);
abstract_actor
(
const
abstract_actor
&
)
=
delete
;
abstract_actor
(
const
abstract_actor
&
)
=
delete
;
...
...
libcaf_core/caf/actor_profiler.hpp
View file @
220f1ac3
...
@@ -77,7 +77,7 @@ public:
...
@@ -77,7 +77,7 @@ public:
virtual
void
before_sending
(
const
local_actor
&
self
,
mailbox_element
&
element
)
virtual
void
before_sending
(
const
local_actor
&
self
,
mailbox_element
&
element
)
=
0
;
=
0
;
/// Analog
u
ous to `before_sending`, but called whenever an actor is about to
/// Analogous to `before_sending`, but called whenever an actor is about to
/// call `actor_clock::schedule_message`.
/// call `actor_clock::schedule_message`.
/// @param self The current actor.
/// @param self The current actor.
/// @param timeout Time point for the message delivery.
/// @param timeout Time point for the message delivery.
...
...
libcaf_core/caf/actor_system.hpp
View file @
220f1ac3
...
@@ -121,7 +121,7 @@ public:
...
@@ -121,7 +121,7 @@ public:
friend
class
net
::
middleman
;
friend
class
net
::
middleman
;
friend
class
abstract_actor
;
friend
class
abstract_actor
;
/// The number of actors implictly spawned by the actor system on startup.
/// The number of actors implic
i
tly spawned by the actor system on startup.
static
constexpr
size_t
num_internal_actors
=
2
;
static
constexpr
size_t
num_internal_actors
=
2
;
/// Returns the ID of an internal actor by its name.
/// Returns the ID of an internal actor by its name.
...
@@ -594,7 +594,7 @@ private:
...
@@ -594,7 +594,7 @@ private:
template
<
class
T
>
template
<
class
T
>
void
check_invariants
()
{
void
check_invariants
()
{
static_assert
(
!
std
::
is_base_of
<
prohibit_top_level_spawn_marker
,
T
>::
value
,
static_assert
(
!
std
::
is_base_of
<
prohibit_top_level_spawn_marker
,
T
>::
value
,
"This actor type cannot be spawned through
t
an actor system. "
"This actor type cannot be spawned through an actor system. "
"Probably you have tried to spawn a broker or opencl actor."
);
"Probably you have tried to spawn a broker or opencl actor."
);
}
}
...
...
libcaf_core/caf/all.hpp
View file @
220f1ac3
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
/// Contains classes and functions used for network abstraction.
/// Contains classes and functions used for network abstraction.
///
///
/// @namespace caf::io::basp
/// @namespace caf::io::basp
/// Contains all classes and functions for the Binary Actor Sytem Protocol.
/// Contains all classes and functions for the Binary Actor Sy
s
tem Protocol.
///
///
/// @defgroup MessageHandling Message Handling
/// @defgroup MessageHandling Message Handling
///
///
...
@@ -289,8 +289,8 @@
...
@@ -289,8 +289,8 @@
///
///
/// @section Atoms Atoms
/// @section Atoms Atoms
///
///
/// Atoms are a nice way to add semantic information
s
to a message.
/// Atoms are a nice way to add semantic information to a message.
/// Assuming an actor wants to provide a "math sevice" for integers. It
/// Assuming an actor wants to provide a "math se
r
vice" for integers. It
/// could provide operations such as addition, subtraction, etc.
/// could provide operations such as addition, subtraction, etc.
/// This operations all have two operands. Thus, the actor does not know
/// This operations all have two operands. Thus, the actor does not know
/// what operation the sender of a message wanted by receiving just two integers.
/// what operation the sender of a message wanted by receiving just two integers.
...
...
libcaf_core/caf/binary_deserializer.hpp
View file @
220f1ac3
...
@@ -91,7 +91,7 @@ public:
...
@@ -91,7 +91,7 @@ public:
/// @pre `num_bytes <= remaining()`
/// @pre `num_bytes <= remaining()`
void
skip
(
size_t
num_bytes
);
void
skip
(
size_t
num_bytes
);
/// Assi
ng
s a new input.
/// Assi
gn
s a new input.
void
reset
(
span
<
const
byte
>
bytes
);
void
reset
(
span
<
const
byte
>
bytes
);
protected:
protected:
...
...
libcaf_core/caf/data_processor.hpp
View file @
220f1ac3
...
@@ -409,7 +409,7 @@ public:
...
@@ -409,7 +409,7 @@ public:
apply
(
std
::
chrono
::
duration
<
Rep
,
Period
>&
x
)
{
apply
(
std
::
chrono
::
duration
<
Rep
,
Period
>&
x
)
{
using
duration_type
=
std
::
chrono
::
duration
<
Rep
,
Period
>
;
using
duration_type
=
std
::
chrono
::
duration
<
Rep
,
Period
>
;
// always save/store durations as int64_t to work around possibly
// always save/store durations as int64_t to work around possibly
// different integer types on different plat
t
forms for standard typedefs
// different integer types on different platforms for standard typedefs
struct
{
struct
{
void
operator
()(
duration_type
&
lhs
,
Rep
&
rhs
)
const
{
void
operator
()(
duration_type
&
lhs
,
Rep
&
rhs
)
const
{
duration_type
tmp
{
rhs
};
duration_type
tmp
{
rhs
};
...
...
libcaf_core/caf/detail/delegate_serialize.hpp
View file @
220f1ac3
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
******************************************************************************/
******************************************************************************/
// The rationale of this header is to provide a serialization API
// The rationale of this header is to provide a serialization API
// that is compat
bi
le to boost.serialization. In particular, the
// that is compat
ib
le to boost.serialization. In particular, the
// design goals are:
// design goals are:
// - allow users to integrate existing boost.serialization-based code easily
// - allow users to integrate existing boost.serialization-based code easily
// - allow to switch out this header with the actual boost header in boost.actor
// - allow to switch out this header with the actual boost header in boost.actor
...
...
libcaf_core/caf/detail/invoke_result_visitor.hpp
View file @
220f1ac3
...
@@ -120,7 +120,7 @@ public:
...
@@ -120,7 +120,7 @@ public:
(
*
this
)(
const_cast
<
const
unit_t
&>
(
x
));
(
*
this
)(
const_cast
<
const
unit_t
&>
(
x
));
}
}
// -- special-purpose handlers that don't pro
cud
e results --------------------
// -- special-purpose handlers that don't pro
duc
e results --------------------
/// Calls `(*this)()`.
/// Calls `(*this)()`.
inline
void
operator
()(
response_promise
&
)
{
inline
void
operator
()(
response_promise
&
)
{
...
...
libcaf_core/caf/detail/is_one_of.hpp
View file @
220f1ac3
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
namespace
caf
::
detail
{
namespace
caf
::
detail
{
/// Checks wheter `T` is in the template parameter pack `Ts`.
/// Checks whet
h
er `T` is in the template parameter pack `Ts`.
template
<
class
T
,
class
...
Ts
>
template
<
class
T
,
class
...
Ts
>
struct
is_one_of
;
struct
is_one_of
;
...
...
libcaf_core/caf/detail/is_primitive_config_value.hpp
View file @
220f1ac3
...
@@ -39,7 +39,7 @@ enum class atom_value : uint64_t;
...
@@ -39,7 +39,7 @@ enum class atom_value : uint64_t;
namespace
caf
::
detail
{
namespace
caf
::
detail
{
/// Checks wheter `T` is in a primitive value type in `config_value`.
/// Checks whet
h
er `T` is in a primitive value type in `config_value`.
template
<
class
T
>
template
<
class
T
>
using
is_primitive_config_value
=
using
is_primitive_config_value
=
is_one_of
<
T
,
int64_t
,
bool
,
double
,
atom_value
,
timespan
,
std
::
string
,
is_one_of
<
T
,
int64_t
,
bool
,
double
,
atom_value
,
timespan
,
std
::
string
,
...
...
libcaf_core/caf/detail/set_thread_name.hpp
View file @
220f1ac3
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
namespace
caf
::
detail
{
namespace
caf
::
detail
{
/// Sets the name thread shown by the OS. Not supported on all plat
t
forms
/// Sets the name thread shown by the OS. Not supported on all platforms
/// (no-op on Windows).
/// (no-op on Windows).
void
set_thread_name
(
const
char
*
name
);
void
set_thread_name
(
const
char
*
name
);
...
...
libcaf_core/caf/detail/type_list.hpp
View file @
220f1ac3
...
@@ -414,7 +414,7 @@ struct tl_reverse_impl<empty_type_list, E...> {
...
@@ -414,7 +414,7 @@ struct tl_reverse_impl<empty_type_list, E...> {
using
type
=
type_list
<
E
...
>
;
using
type
=
type_list
<
E
...
>
;
};
};
/// Creates a new list wih elements in reversed order.
/// Creates a new list wi
t
h elements in reversed order.
template
<
class
List
>
template
<
class
List
>
struct
tl_reverse
{
struct
tl_reverse
{
using
type
=
typename
tl_reverse_impl
<
List
>::
type
;
using
type
=
typename
tl_reverse_impl
<
List
>::
type
;
...
@@ -704,7 +704,7 @@ struct tl_map_conditional<empty_type_list, Trait, TraitResult, Funs...> {
...
@@ -704,7 +704,7 @@ struct tl_map_conditional<empty_type_list, Trait, TraitResult, Funs...> {
// list pop_back()
// list pop_back()
/// Creates a new list wih all but the last element of `List`.
/// Creates a new list wi
t
h all but the last element of `List`.
template
<
class
List
>
template
<
class
List
>
struct
tl_pop_back
{
struct
tl_pop_back
{
using
type
=
typename
tl_slice
<
List
,
0
,
tl_size
<
List
>::
value
-
1
>::
type
;
using
type
=
typename
tl_slice
<
List
,
0
,
tl_size
<
List
>::
value
-
1
>::
type
;
...
...
libcaf_core/caf/detail/type_traits.hpp
View file @
220f1ac3
...
@@ -226,7 +226,7 @@ public:
...
@@ -226,7 +226,7 @@ public:
static
constexpr
bool
value
=
std
::
is_same
<
bool
,
result_type
>::
value
;
static
constexpr
bool
value
=
std
::
is_same
<
bool
,
result_type
>::
value
;
};
};
/// Checks wheter `T` behaves like a forward iterator.
/// Checks whet
h
er `T` behaves like a forward iterator.
template
<
class
T
>
template
<
class
T
>
class
is_forward_iterator
{
class
is_forward_iterator
{
template
<
class
C
>
template
<
class
C
>
...
@@ -417,7 +417,7 @@ struct is_serializable<const T&> : is_serializable<T> {
...
@@ -417,7 +417,7 @@ struct is_serializable<const T&> : is_serializable<T> {
// nop
// nop
};
};
/// Checks wheter `T` is a non-const reference.
/// Checks whet
h
er `T` is a non-const reference.
template
<
class
T
>
template
<
class
T
>
struct
is_mutable_ref
:
std
::
false_type
{
};
struct
is_mutable_ref
:
std
::
false_type
{
};
...
@@ -524,7 +524,7 @@ struct get_callable_trait : get_callable_trait_helper<decay_t<T>> {};
...
@@ -524,7 +524,7 @@ struct get_callable_trait : get_callable_trait_helper<decay_t<T>> {};
template
<
class
T
>
template
<
class
T
>
using
get_callable_trait_t
=
typename
get_callable_trait
<
T
>::
type
;
using
get_callable_trait_t
=
typename
get_callable_trait
<
T
>::
type
;
/// Checks wheter `T` is a function or member function.
/// Checks whet
h
er `T` is a function or member function.
template
<
class
T
>
template
<
class
T
>
struct
is_callable
{
struct
is_callable
{
template
<
class
C
>
template
<
class
C
>
...
@@ -538,7 +538,7 @@ public:
...
@@ -538,7 +538,7 @@ public:
static
constexpr
bool
value
=
std
::
is_same
<
bool
,
result_type
>::
value
;
static
constexpr
bool
value
=
std
::
is_same
<
bool
,
result_type
>::
value
;
};
};
/// Checks wheter `F` is callable with arguments of types `Ts...`.
/// Checks whet
h
er `F` is callable with arguments of types `Ts...`.
template
<
class
F
,
class
...
Ts
>
template
<
class
F
,
class
...
Ts
>
struct
is_callable_with
{
struct
is_callable_with
{
template
<
class
U
>
template
<
class
U
>
...
@@ -552,7 +552,7 @@ struct is_callable_with {
...
@@ -552,7 +552,7 @@ struct is_callable_with {
static
constexpr
bool
value
=
type
::
value
;
static
constexpr
bool
value
=
type
::
value
;
};
};
/// Checks wheter `F` takes mutable references.
/// Checks whet
h
er `F` takes mutable references.
///
///
/// A manipulator is a functor that manipulates its arguments via
/// A manipulator is a functor that manipulates its arguments via
/// mutable references.
/// mutable references.
...
@@ -590,11 +590,11 @@ private:
...
@@ -590,11 +590,11 @@ private:
// no members
// no members
};
};
// picked for any U without requested member since `U::name` is not ambig
i
ous
// picked for any U without requested member since `U::name` is not ambig
u
ous
template
<
class
U
>
template
<
class
U
>
static
char
fun
(
U
*
,
decltype
(
U
::
name
)
*
=
nullptr
);
static
char
fun
(
U
*
,
decltype
(
U
::
name
)
*
=
nullptr
);
// picked for any U with requested member since `U::name` is ambig
i
ous
// picked for any U with requested member since `U::name` is ambig
u
ous
static
int
fun
(
void
*
);
static
int
fun
(
void
*
);
public:
public:
...
...
libcaf_core/caf/fused_downstream_manager.hpp
View file @
220f1ac3
...
@@ -112,7 +112,7 @@ public:
...
@@ -112,7 +112,7 @@ public:
/// Unique pointer to an outbound path.
/// Unique pointer to an outbound path.
using
typename
super
::
unique_path_ptr
;
using
typename
super
::
unique_path_ptr
;
// Lists all tempate parameters `[T, Ts...]`;
// Lists all temp
l
ate parameters `[T, Ts...]`;
using
param_list
=
detail
::
type_list
<
T
,
Ts
...
>
;
using
param_list
=
detail
::
type_list
<
T
,
Ts
...
>
;
/// State held for each slot.
/// State held for each slot.
...
...
libcaf_core/caf/intrusive/lifo_inbox.hpp
View file @
220f1ac3
...
@@ -255,19 +255,19 @@ public:
...
@@ -255,19 +255,19 @@ public:
private:
private:
static
constexpr
pointer
stack_empty_tag
()
{
static
constexpr
pointer
stack_empty_tag
()
{
// We are *never* going to dereference the returned pointer. It is only
// We are *never* going to dereference the returned pointer. It is only
// used as indicator wheter this queue is empty or not.
// used as indicator whet
h
er this queue is empty or not.
return
static_cast
<
pointer
>
(
nullptr
);
return
static_cast
<
pointer
>
(
nullptr
);
}
}
pointer
stack_closed_tag
()
const
noexcept
{
pointer
stack_closed_tag
()
const
noexcept
{
// We are *never* going to dereference the returned pointer. It is only
// We are *never* going to dereference the returned pointer. It is only
// used as indicator wheter this queue is closed or not.
// used as indicator whet
h
er this queue is closed or not.
return
reinterpret_cast
<
pointer
>
(
reinterpret_cast
<
intptr_t
>
(
this
)
+
1
);
return
reinterpret_cast
<
pointer
>
(
reinterpret_cast
<
intptr_t
>
(
this
)
+
1
);
}
}
pointer
reader_blocked_tag
()
const
noexcept
{
pointer
reader_blocked_tag
()
const
noexcept
{
// We are *never* going to dereference the returned pointer. It is only
// We are *never* going to dereference the returned pointer. It is only
// used as indicator wheter the owner of the queue is currently waiting for
// used as indicator whet
h
er the owner of the queue is currently waiting for
// new messages.
// new messages.
return
reinterpret_cast
<
pointer
>
(
const_cast
<
lifo_inbox
*>
(
this
));
return
reinterpret_cast
<
pointer
>
(
const_cast
<
lifo_inbox
*>
(
this
));
}
}
...
...
libcaf_core/caf/logger.hpp
View file @
220f1ac3
...
@@ -151,7 +151,7 @@ public:
...
@@ -151,7 +151,7 @@ public:
timestamp
tstamp
;
timestamp
tstamp
;
};
};
/// Internal representation of format string entites.
/// Internal representation of format string entit
i
es.
enum
field_type
{
enum
field_type
{
invalid_field
,
invalid_field
,
category_field
,
category_field
,
...
@@ -406,11 +406,11 @@ bool operator==(const logger::field& x, const logger::field& y);
...
@@ -406,11 +406,11 @@ bool operator==(const logger::field& x, const logger::field& y);
// -- utility macros -----------------------------------------------------------
// -- utility macros -----------------------------------------------------------
#ifdef CAF_MSVC
#ifdef CAF_MSVC
/// Expands to a string representation of the current func
it
on name that
/// Expands to a string representation of the current func
ti
on name that
/// includes the full function name and its signature.
/// includes the full function name and its signature.
# define CAF_PRETTY_FUN __FUNCSIG__
# define CAF_PRETTY_FUN __FUNCSIG__
#else // CAF_MSVC
#else // CAF_MSVC
/// Expands to a string representation of the current func
it
on name that
/// Expands to a string representation of the current func
ti
on name that
/// includes the full function name and its signature.
/// includes the full function name and its signature.
# define CAF_PRETTY_FUN __PRETTY_FUNCTION__
# define CAF_PRETTY_FUN __PRETTY_FUNCTION__
#endif // CAF_MSVC
#endif // CAF_MSVC
...
...
libcaf_core/caf/make_config_option.hpp
View file @
220f1ac3
...
@@ -99,7 +99,7 @@ config_option make_config_option(T& storage, string_view category,
...
@@ -99,7 +99,7 @@ config_option make_config_option(T& storage, string_view category,
std
::
addressof
(
storage
)};
std
::
addressof
(
storage
)};
}
}
// -- backward compat
bility, do not use for new code ! -
------------------------
// -- backward compat
ibility, do not use for new code !
------------------------
// Inverts the value when writing to `storage`.
// Inverts the value when writing to `storage`.
config_option
make_negated_config_option
(
bool
&
storage
,
string_view
category
,
config_option
make_negated_config_option
(
bool
&
storage
,
string_view
category
,
...
...
libcaf_core/caf/memory_managed.hpp
View file @
220f1ac3
...
@@ -26,7 +26,7 @@ namespace caf {
...
@@ -26,7 +26,7 @@ namespace caf {
class
memory_managed
{
class
memory_managed
{
public:
public:
/// Default implementations calls `delete this, but can
/// Default implementations calls `delete this, but can
/// be overriden in case deletion depends on some condition or
/// be overrid
d
en in case deletion depends on some condition or
/// the class doesn't use default new/delete.
/// the class doesn't use default new/delete.
/// @param decremented_rc Indicates whether the caller did reduce the
/// @param decremented_rc Indicates whether the caller did reduce the
/// reference of this object before calling this member
/// reference of this object before calling this member
...
...
libcaf_core/caf/message.hpp
View file @
220f1ac3
...
@@ -322,7 +322,7 @@ struct message::cli_arg {
...
@@ -322,7 +322,7 @@ struct message::cli_arg {
/// Full name of this CLI argument using format "<long name>[,<short name>]"
/// Full name of this CLI argument using format "<long name>[,<short name>]"
std
::
string
name
;
std
::
string
name
;
/// Desciption of this CLI argument for the auto-generated help text.
/// Desc
r
iption of this CLI argument for the auto-generated help text.
std
::
string
text
;
std
::
string
text
;
/// Auto-generated helptext for this item.
/// Auto-generated helptext for this item.
...
...
libcaf_core/caf/message_builder.hpp
View file @
220f1ac3
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
namespace
caf
{
namespace
caf
{
/// Provides a convenient interface for creat
e
ing `message` objects
/// Provides a convenient interface for creating `message` objects
/// from a series of values using the member function `append`.
/// from a series of values using the member function `append`.
class
message_builder
{
class
message_builder
{
public:
public:
...
...
libcaf_core/caf/monitorable_actor.hpp
View file @
220f1ac3
...
@@ -102,7 +102,7 @@ public:
...
@@ -102,7 +102,7 @@ public:
protected:
protected:
/// Allows subclasses to add additional cleanup code to the
/// Allows subclasses to add additional cleanup code to the
/// critical secion in `cleanup`. This member function is
/// critical sec
t
ion in `cleanup`. This member function is
/// called inside of a critical section.
/// called inside of a critical section.
virtual
void
on_cleanup
(
const
error
&
reason
);
virtual
void
on_cleanup
(
const
error
&
reason
);
...
...
libcaf_core/caf/parser_state.hpp
View file @
220f1ac3
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
namespace
caf
{
namespace
caf
{
/// Stores all information
s
necessary for implementing an FSM-based parser.
/// Stores all information necessary for implementing an FSM-based parser.
template
<
class
Iterator
,
class
Sentinel
>
template
<
class
Iterator
,
class
Sentinel
>
struct
parser_state
{
struct
parser_state
{
/// Current position of the parser.
/// Current position of the parser.
...
...
libcaf_core/caf/pec.hpp
View file @
220f1ac3
...
@@ -59,7 +59,7 @@ enum class pec : uint8_t {
...
@@ -59,7 +59,7 @@ enum class pec : uint8_t {
type_mismatch
,
type_mismatch
,
/// Stopped at an unrecognized option name.
/// Stopped at an unrecognized option name.
not_an_option
,
not_an_option
,
/// Stopped at an unpars
e
able argument.
/// Stopped at an unparsable argument.
illegal_argument
=
15
,
illegal_argument
=
15
,
/// Stopped because an argument was omitted.
/// Stopped because an argument was omitted.
missing_argument
,
missing_argument
,
...
...
libcaf_core/caf/policy/work_stealing.hpp
View file @
220f1ac3
...
@@ -134,7 +134,7 @@ public:
...
@@ -134,7 +134,7 @@ public:
template
<
class
Worker
>
template
<
class
Worker
>
resumable
*
dequeue
(
Worker
*
self
)
{
resumable
*
dequeue
(
Worker
*
self
)
{
// we wait for new jobs by polling our external queue: first, we
// we wait for new jobs by polling our external queue: first, we
// assume an active work load on the machine and perform aggresive
// assume an active work load on the machine and perform aggres
s
ive
// polling, then we relax our polling a bit and wait 50 us between
// polling, then we relax our polling a bit and wait 50 us between
// dequeue attempts
// dequeue attempts
auto
&
strategies
=
d
(
self
).
strategies
;
auto
&
strategies
=
d
(
self
).
strategies
;
...
@@ -153,8 +153,8 @@ public:
...
@@ -153,8 +153,8 @@ public:
}
}
if
(
strategies
[
k
].
sleep_duration
.
count
()
>
0
)
{
if
(
strategies
[
k
].
sleep_duration
.
count
()
>
0
)
{
#ifdef CAF_MSVC
#ifdef CAF_MSVC
// Windows cannot sleep less than 1000 us, so timeout is conve
ted to 0
// Windows cannot sleep less than 1000 us, so timeout is conve
rted to
// inside sleep_for(), but Sleep(0) is dangerous so replace it with
//
0
inside sleep_for(), but Sleep(0) is dangerous so replace it with
// yield()
// yield()
if
(
strategies
[
k
].
sleep_duration
.
count
()
<
1000
)
if
(
strategies
[
k
].
sleep_duration
.
count
()
<
1000
)
std
::
this_thread
::
yield
();
std
::
this_thread
::
yield
();
...
...
libcaf_core/caf/spawn_options.hpp
View file @
220f1ac3
...
@@ -67,43 +67,43 @@ constexpr spawn_options hidden = spawn_options::hide_flag;
...
@@ -67,43 +67,43 @@ constexpr spawn_options hidden = spawn_options::hide_flag;
/// initialization until a message arrives.
/// initialization until a message arrives.
constexpr
spawn_options
lazy_init
=
spawn_options
::
lazy_init_flag
;
constexpr
spawn_options
lazy_init
=
spawn_options
::
lazy_init_flag
;
/// Checks wheter `haystack` contains `needle`.
/// Checks whet
h
er `haystack` contains `needle`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_spawn_option
(
spawn_options
haystack
,
spawn_options
needle
)
{
constexpr
bool
has_spawn_option
(
spawn_options
haystack
,
spawn_options
needle
)
{
return
(
static_cast
<
int
>
(
haystack
)
&
static_cast
<
int
>
(
needle
))
!=
0
;
return
(
static_cast
<
int
>
(
haystack
)
&
static_cast
<
int
>
(
needle
))
!=
0
;
}
}
/// Checks wheter the {@link detached} flag is set in `opts`.
/// Checks whet
h
er the {@link detached} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_detach_flag
(
spawn_options
opts
)
{
constexpr
bool
has_detach_flag
(
spawn_options
opts
)
{
return
has_spawn_option
(
opts
,
detached
);
return
has_spawn_option
(
opts
,
detached
);
}
}
/// Checks wheter the {@link priority_aware} flag is set in `opts`.
/// Checks whet
h
er the {@link priority_aware} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_priority_aware_flag
(
spawn_options
)
{
constexpr
bool
has_priority_aware_flag
(
spawn_options
)
{
return
true
;
return
true
;
}
}
/// Checks wheter the {@link hidden} flag is set in `opts`.
/// Checks whet
h
er the {@link hidden} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_hide_flag
(
spawn_options
opts
)
{
constexpr
bool
has_hide_flag
(
spawn_options
opts
)
{
return
has_spawn_option
(
opts
,
hidden
);
return
has_spawn_option
(
opts
,
hidden
);
}
}
/// Checks wheter the {@link linked} flag is set in `opts`.
/// Checks whet
h
er the {@link linked} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_link_flag
(
spawn_options
opts
)
{
constexpr
bool
has_link_flag
(
spawn_options
opts
)
{
return
has_spawn_option
(
opts
,
linked
);
return
has_spawn_option
(
opts
,
linked
);
}
}
/// Checks wheter the {@link monitored} flag is set in `opts`.
/// Checks whet
h
er the {@link monitored} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_monitor_flag
(
spawn_options
opts
)
{
constexpr
bool
has_monitor_flag
(
spawn_options
opts
)
{
return
has_spawn_option
(
opts
,
monitored
);
return
has_spawn_option
(
opts
,
monitored
);
}
}
/// Checks wheter the {@link lazy_init} flag is set in `opts`.
/// Checks whet
h
er the {@link lazy_init} flag is set in `opts`.
/// @relates spawn_options
/// @relates spawn_options
constexpr
bool
has_lazy_init_flag
(
spawn_options
opts
)
{
constexpr
bool
has_lazy_init_flag
(
spawn_options
opts
)
{
return
has_spawn_option
(
opts
,
lazy_init
);
return
has_spawn_option
(
opts
,
lazy_init
);
...
...
libcaf_core/caf/stateful_actor.hpp
View file @
220f1ac3
...
@@ -33,7 +33,7 @@ namespace caf {
...
@@ -33,7 +33,7 @@ namespace caf {
/// An event-based actor with managed state. The state is constructed
/// An event-based actor with managed state. The state is constructed
/// before `make_behavior` will get called and destroyed after the
/// before `make_behavior` will get called and destroyed after the
/// actor called `quit`. This state management brakes cycles and
/// actor called `quit`. This state management brakes cycles and
/// allows actors to automatically release res
s
ources as soon
/// allows actors to automatically release resources as soon
/// as possible.
/// as possible.
template
<
class
State
,
class
Base
/* = event_based_actor (see fwd.hpp) */
>
template
<
class
State
,
class
Base
/* = event_based_actor (see fwd.hpp) */
>
class
stateful_actor
:
public
Base
{
class
stateful_actor
:
public
Base
{
...
...
libcaf_core/caf/string_view.hpp
View file @
220f1ac3
...
@@ -31,7 +31,7 @@ namespace caf {
...
@@ -31,7 +31,7 @@ namespace caf {
namespace
detail
{
namespace
detail
{
// Catches `std::string`, `std::string_view` and all classes mimicing those,
// Catches `std::string`, `std::string_view` and all classes mimic
k
ing those,
// but not `std::vector<char>` or other buffers.
// but not `std::vector<char>` or other buffers.
template
<
class
T
>
template
<
class
T
>
struct
is_string_like
{
struct
is_string_like
{
...
@@ -212,7 +212,7 @@ public:
...
@@ -212,7 +212,7 @@ public:
void
assign
(
const_pointer
data
,
size_type
len
);
void
assign
(
const_pointer
data
,
size_type
len
);
// -- algor
ti
hms -------------------------------------------------------------
// -- algor
it
hms -------------------------------------------------------------
size_type
copy
(
pointer
dest
,
size_type
n
,
size_type
pos
=
0
)
const
;
size_type
copy
(
pointer
dest
,
size_type
n
,
size_type
pos
=
0
)
const
;
...
...
libcaf_core/caf/typed_behavior.hpp
View file @
220f1ac3
...
@@ -114,7 +114,7 @@ struct valid_input {
...
@@ -114,7 +114,7 @@ struct valid_input {
// this function is called from typed_behavior<...>::set and its whole
// this function is called from typed_behavior<...>::set and its whole
// purpose is to give users a nicer error message on a type mismatch
// purpose is to give users a nicer error message on a type mismatch
// (this function only has the type information
s
needed to understand the error)
// (this function only has the type information needed to understand the error)
template
<
class
SignatureList
,
class
InputList
>
template
<
class
SignatureList
,
class
InputList
>
void
static_check_typed_behavior_input
()
{
void
static_check_typed_behavior_input
()
{
constexpr
bool
is_valid
=
valid_input
<
SignatureList
,
InputList
>::
value
;
constexpr
bool
is_valid
=
valid_input
<
SignatureList
,
InputList
>::
value
;
...
...
libcaf_core/src/actor_system_config.cpp
View file @
220f1ac3
...
@@ -106,10 +106,10 @@ actor_system_config::actor_system_config()
...
@@ -106,10 +106,10 @@ actor_system_config::actor_system_config()
opt_group
{
custom_options_
,
"logger"
}
opt_group
{
custom_options_
,
"logger"
}
.
add
<
atom_value
>
(
"verbosity"
,
"default verbosity for file and console"
)
.
add
<
atom_value
>
(
"verbosity"
,
"default verbosity for file and console"
)
.
add
<
string
>
(
"file-name"
,
"filesystem path of the log file"
)
.
add
<
string
>
(
"file-name"
,
"filesystem path of the log file"
)
.
add
<
string
>
(
"file-format"
,
"line format for individual log file ent
ir
es"
)
.
add
<
string
>
(
"file-format"
,
"line format for individual log file ent
ri
es"
)
.
add
<
atom_value
>
(
"file-verbosity"
,
"file output verbosity"
)
.
add
<
atom_value
>
(
"file-verbosity"
,
"file output verbosity"
)
.
add
<
atom_value
>
(
"console"
,
"std::clog output: none, colored, or uncolored"
)
.
add
<
atom_value
>
(
"console"
,
"std::clog output: none, colored, or uncolored"
)
.
add
<
string
>
(
"console-format"
,
"line format for printed log ent
ir
es"
)
.
add
<
string
>
(
"console-format"
,
"line format for printed log ent
ri
es"
)
.
add
<
atom_value
>
(
"console-verbosity"
,
"console output verbosity"
)
.
add
<
atom_value
>
(
"console-verbosity"
,
"console output verbosity"
)
.
add
<
std
::
vector
<
atom_value
>>
(
"component-blacklist"
,
.
add
<
std
::
vector
<
atom_value
>>
(
"component-blacklist"
,
"excluded components for logging"
)
"excluded components for logging"
)
...
@@ -223,7 +223,7 @@ actor_system_config::make_help_text(const std::vector<message::cli_arg>& xs) {
...
@@ -223,7 +223,7 @@ actor_system_config::make_help_text(const std::vector<message::cli_arg>& xs) {
auto
op
=
[](
size_t
tmp
,
const
message
::
cli_arg
&
arg
)
{
auto
op
=
[](
size_t
tmp
,
const
message
::
cli_arg
&
arg
)
{
return
std
::
max
(
tmp
,
arg
.
helptext
.
size
());
return
std
::
max
(
tmp
,
arg
.
helptext
.
size
());
};
};
// maximum string leng
ht
of all options
// maximum string leng
th
of all options
auto
name_width
=
std
::
accumulate
(
xs
.
begin
(),
xs
.
end
(),
size_t
{
0
},
op
);
auto
name_width
=
std
::
accumulate
(
xs
.
begin
(),
xs
.
end
(),
size_t
{
0
},
op
);
// iterators to the vector with respect to partition point
// iterators to the vector with respect to partition point
auto
first
=
xs
.
begin
();
auto
first
=
xs
.
begin
();
...
...
libcaf_core/src/config_option_set.cpp
View file @
220f1ac3
...
@@ -58,7 +58,7 @@ config_option_set& config_option_set::add(config_option opt) {
...
@@ -58,7 +58,7 @@ config_option_set& config_option_set::add(config_option opt) {
}
}
std
::
string
config_option_set
::
help_text
(
bool
global_only
)
const
{
std
::
string
config_option_set
::
help_text
(
bool
global_only
)
const
{
//<--- argument --------> <---- desc
iption -
--->
//<--- argument --------> <---- desc
ription
--->
// (-w|--write) <string> : output file
// (-w|--write) <string> : output file
auto
build_argument
=
[](
const
config_option
&
x
)
{
auto
build_argument
=
[](
const
config_option
&
x
)
{
string_builder
sb
;
string_builder
sb
;
...
...
libcaf_core/src/logger.cpp
View file @
220f1ac3
...
@@ -409,7 +409,7 @@ void logger::render_fun_prefix(std::ostream& out, const event& x) {
...
@@ -409,7 +409,7 @@ void logger::render_fun_prefix(std::ostream& out, const event& x) {
// ^~~~~~~~~~~~~
// ^~~~~~~~~~~~~
// Here, we output Java-style "my.namespace" to `out`.
// Here, we output Java-style "my.namespace" to `out`.
auto
reduced
=
x
.
pretty_fun
;
auto
reduced
=
x
.
pretty_fun
;
// Skip all prefixes that can prece
ed
the return type.
// Skip all prefixes that can prece
de
the return type.
auto
skip
=
[
&
](
string_view
str
)
{
auto
skip
=
[
&
](
string_view
str
)
{
if
(
starts_with
(
reduced
,
str
))
{
if
(
starts_with
(
reduced
,
str
))
{
reduced
.
remove_prefix
(
str
.
size
());
reduced
.
remove_prefix
(
str
.
size
());
...
...
libcaf_core/src/message.cpp
View file @
220f1ac3
...
@@ -363,7 +363,7 @@ message::cli_res message::extract_opts(std::vector<cli_arg> xs,
...
@@ -363,7 +363,7 @@ message::cli_res message::extract_opts(std::vector<cli_arg> xs,
return
skip
();
return
skip
();
if
(
arg
==
"--"
)
{
if
(
arg
==
"--"
)
{
skip_remainder
=
true
;
skip_remainder
=
true
;
// drop f
ri
st remainder indicator
// drop f
ir
st remainder indicator
return
none
;
return
none
;
}
}
if
(
arg
.
empty
()
||
arg
.
front
()
!=
'-'
)
{
if
(
arg
.
empty
()
||
arg
.
front
()
!=
'-'
)
{
...
...
libcaf_core/src/replies_to.cpp
View file @
220f1ac3
...
@@ -29,7 +29,7 @@ std::string replies_to_type_name(size_t input_size,
...
@@ -29,7 +29,7 @@ std::string replies_to_type_name(size_t input_size,
std
::
string
result
;
std
::
string
result
;
// 'void' is not an announced type, hence we check whether uniform_typeid
// 'void' is not an announced type, hence we check whether uniform_typeid
// did return a valid pointer to identify 'void' (this has the
// did return a valid pointer to identify 'void' (this has the
// possibility of false positives, but those will be ca
tched
anyways)
// possibility of false positives, but those will be ca
ught
anyways)
result
=
"caf::replies_to<"
;
result
=
"caf::replies_to<"
;
result
+=
join
(
input
,
input
+
input_size
,
glue
);
result
+=
join
(
input
,
input
+
input_size
,
glue
);
result
+=
">::with<"
;
result
+=
">::with<"
;
...
...
libcaf_core/src/scheduled_actor.cpp
View file @
220f1ac3
...
@@ -460,7 +460,7 @@ void scheduled_actor::quit(error x) {
...
@@ -460,7 +460,7 @@ void scheduled_actor::quit(error x) {
for
(
auto
i
=
managers
.
begin
();
i
!=
e
;
++
i
)
{
for
(
auto
i
=
managers
.
begin
();
i
!=
e
;
++
i
)
{
auto
&
mgr
=
*
i
;
auto
&
mgr
=
*
i
;
mgr
->
shutdown
();
mgr
->
shutdown
();
// Managers can become done after calling quit if they were continous.
// Managers can become done after calling quit if they were contin
u
ous.
if
(
mgr
->
done
())
{
if
(
mgr
->
done
())
{
mgr
->
stop
();
mgr
->
stop
();
erase_stream_manager
(
mgr
);
erase_stream_manager
(
mgr
);
...
@@ -1076,7 +1076,7 @@ void scheduled_actor::erase_stream_manager(const stream_manager_ptr& mgr) {
...
@@ -1076,7 +1076,7 @@ void scheduled_actor::erase_stream_manager(const stream_manager_ptr& mgr) {
invoke_message_result
invoke_message_result
scheduled_actor
::
handle_open_stream_msg
(
mailbox_element
&
x
)
{
scheduled_actor
::
handle_open_stream_msg
(
mailbox_element
&
x
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
x
));
CAF_LOG_TRACE
(
CAF_ARG
(
x
));
// Fetches a stream manger from a behavior.
// Fetches a stream man
a
ger from a behavior.
struct
visitor
:
detail
::
invoke_result_visitor
{
struct
visitor
:
detail
::
invoke_result_visitor
{
void
operator
()()
override
{
void
operator
()()
override
{
// nop
// nop
...
...
libcaf_core/src/string_view.cpp
View file @
220f1ac3
...
@@ -83,7 +83,7 @@ void string_view::assign(const_pointer data, size_type len) {
...
@@ -83,7 +83,7 @@ void string_view::assign(const_pointer data, size_type len) {
size_
=
len
;
size_
=
len
;
}
}
// -- algor
ti
hms ---------------------------------------------------------------
// -- algor
it
hms ---------------------------------------------------------------
string_view
::
size_type
string_view
::
copy
(
pointer
dest
,
size_type
n
,
string_view
::
size_type
string_view
::
copy
(
pointer
dest
,
size_type
n
,
size_type
pos
)
const
{
size_type
pos
)
const
{
...
...
libcaf_core/test/actor_lifetime.cpp
View file @
220f1ac3
...
@@ -184,7 +184,7 @@ struct fixture {
...
@@ -184,7 +184,7 @@ struct fixture {
}
// namespace
}
// namespace
CAF_TEST
(
destructor_call
)
{
CAF_TEST
(
destructor_call
)
{
{
// lifetime scope of actor syst
me
{
// lifetime scope of actor syst
em
actor_system_config
cfg
;
actor_system_config
cfg
;
actor_system
system
{
cfg
};
actor_system
system
{
cfg
};
system
.
spawn
<
testee
>
();
system
.
spawn
<
testee
>
();
...
...
libcaf_core/test/handles.cpp
View file @
220f1ac3
...
@@ -57,7 +57,7 @@ struct handle_set {
...
@@ -57,7 +57,7 @@ struct handle_set {
actor_addr
wh
;
actor_addr
wh
;
// Dynamically typed handle to the actor.
// Dynamically typed handle to the actor.
actor
dt
;
actor
dt
;
// Staically typed handle to the actor.
// Sta
t
ically typed handle to the actor.
testee_actor
st
;
testee_actor
st
;
handle_set
()
=
default
;
handle_set
()
=
default
;
...
...
libcaf_core/test/intrusive_ptr.cpp
View file @
220f1ac3
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#define CAF_SUITE intrusive_ptr
#define CAF_SUITE intrusive_ptr
#include "caf/test/unit_test.hpp"
#include "caf/test/unit_test.hpp"
// this test dosn't verify thread-safety of intrusive_ptr
// this test do
e
sn't verify thread-safety of intrusive_ptr
// however, it is thread safe since it uses atomic operations only
// however, it is thread safe since it uses atomic operations only
#include <vector>
#include <vector>
...
...
libcaf_core/test/ipv4_subnet.cpp
View file @
220f1ac3
...
@@ -54,7 +54,7 @@ CAF_TEST(equality) {
...
@@ -54,7 +54,7 @@ CAF_TEST(equality) {
CAF_CHECK_EQUAL
(
a
,
b
);
CAF_CHECK_EQUAL
(
a
,
b
);
}
}
CAF_TEST
(
con
s
tains
)
{
CAF_TEST
(
contains
)
{
ipv4_subnet
local
{
addr
(
127
,
0
,
0
,
0
),
8
};
ipv4_subnet
local
{
addr
(
127
,
0
,
0
,
0
),
8
};
CAF_CHECK
(
local
.
contains
(
addr
(
127
,
0
,
0
,
1
)));
CAF_CHECK
(
local
.
contains
(
addr
(
127
,
0
,
0
,
1
)));
CAF_CHECK
(
local
.
contains
(
addr
(
127
,
1
,
2
,
3
)));
CAF_CHECK
(
local
.
contains
(
addr
(
127
,
1
,
2
,
3
)));
...
...
libcaf_core/test/ipv6_subnet.cpp
View file @
220f1ac3
...
@@ -49,7 +49,7 @@ CAF_TEST(equality) {
...
@@ -49,7 +49,7 @@ CAF_TEST(equality) {
CAF_CHECK_EQUAL
(
a
,
b
);
CAF_CHECK_EQUAL
(
a
,
b
);
}
}
CAF_TEST
(
con
s
tains
)
{
CAF_TEST
(
contains
)
{
auto
local
=
ipv6_address
{{
0xbebe
,
0xbebe
},
{}}
/
32
;
auto
local
=
ipv6_address
{{
0xbebe
,
0xbebe
},
{}}
/
32
;
CAF_CHECK
(
local
.
contains
(
ipv6_address
({
0xbebe
,
0xbebe
,
0xbebe
},
{})));
CAF_CHECK
(
local
.
contains
(
ipv6_address
({
0xbebe
,
0xbebe
,
0xbebe
},
{})));
CAF_CHECK
(
!
local
.
contains
(
ipv6_address
({
0xbebe
,
0xbebf
},
{})));
CAF_CHECK
(
!
local
.
contains
(
ipv6_address
({
0xbebe
,
0xbebf
},
{})));
...
...
libcaf_core/test/logger.cpp
View file @
220f1ac3
...
@@ -53,7 +53,7 @@ void global_fun() {
...
@@ -53,7 +53,7 @@ void global_fun() {
// Clang expands template parameters in __PRETTY_FUNCTION__, while GCC does
// Clang expands template parameters in __PRETTY_FUNCTION__, while GCC does
// not. For example, Clang would produce "void foo<int>::bar()", while GCC
// not. For example, Clang would produce "void foo<int>::bar()", while GCC
// would produce "void foo<T>::bar() [with T = int]". A type called T gives
// would produce "void foo<T>::bar() [with T = int]". A type called T gives
// us always the same ou
pt
ut for the prefix.
// us always the same ou
tp
ut for the prefix.
struct
T
{};
struct
T
{};
namespace
{
namespace
{
...
...
libcaf_core/test/make_config_value_field.cpp
View file @
220f1ac3
...
@@ -203,7 +203,7 @@ CAF_TEST(getter and setter access) {
...
@@ -203,7 +203,7 @@ CAF_TEST(getter and setter access) {
test_foo_field
(
foo_field
);
test_foo_field
(
foo_field
);
}
}
CAF_TEST
(
oject
access
from
dictionary
-
foobar
)
{
CAF_TEST
(
o
b
ject
access
from
dictionary
-
foobar
)
{
settings
x
;
settings
x
;
put
(
x
,
"my-value.bar"
,
"hello"
);
put
(
x
,
"my-value.bar"
,
"hello"
);
CAF_MESSAGE
(
"without foo member"
);
CAF_MESSAGE
(
"without foo member"
);
...
@@ -225,7 +225,7 @@ CAF_TEST(oject access from dictionary - foobar) {
...
@@ -225,7 +225,7 @@ CAF_TEST(oject access from dictionary - foobar) {
}
}
}
}
CAF_TEST
(
oject
access
from
dictionary
-
foobar_foobar
)
{
CAF_TEST
(
o
b
ject
access
from
dictionary
-
foobar_foobar
)
{
settings
x
;
settings
x
;
put
(
x
,
"my-value.x.foo"
,
1
);
put
(
x
,
"my-value.x.foo"
,
1
);
put
(
x
,
"my-value.x.bar"
,
"hello"
);
put
(
x
,
"my-value.x.bar"
,
"hello"
);
...
...
libcaf_core/test/native_streaming_classes.cpp
View file @
220f1ac3
...
@@ -661,7 +661,7 @@ CAF_TEST(depth_3_pipeline_2000_items) {
...
@@ -661,7 +661,7 @@ CAF_TEST(depth_3_pipeline_2000_items) {
loop
(
alice
,
bob
);
loop
(
alice
,
bob
);
CAF_CHECK_NOT_EQUAL
(
bob
.
data
.
size
(),
0u
);
CAF_CHECK_NOT_EQUAL
(
bob
.
data
.
size
(),
0u
);
CAF_CHECK_EQUAL
(
carl
.
data
.
size
(),
0u
);
CAF_CHECK_EQUAL
(
carl
.
data
.
size
(),
0u
);
CAF_MESSAGE
(
"loop over bob and carl until bob fin
si
hed sending"
);
CAF_MESSAGE
(
"loop over bob and carl until bob fin
is
hed sending"
);
// bob has one batch from alice in its mailbox that bob will read when
// bob has one batch from alice in its mailbox that bob will read when
// becoming uncongested again
// becoming uncongested again
loop
(
bob
,
carl
);
loop
(
bob
,
carl
);
...
...
libcaf_core/test/policy/categorized.cpp
View file @
220f1ac3
...
@@ -68,14 +68,14 @@ struct consumer {
...
@@ -68,14 +68,14 @@ struct consumer {
intrusive
::
task_result
operator
()(
const
Key
&
,
const
Queue
&
,
intrusive
::
task_result
operator
()(
const
Key
&
,
const
Queue
&
,
const
mailbox_element
&
x
)
{
const
mailbox_element
&
x
)
{
if
(
!
x
.
content
().
match_elements
<
int
>
())
if
(
!
x
.
content
().
match_elements
<
int
>
())
CAF_FAIL
(
"unex
e
pected message: "
<<
x
.
content
());
CAF_FAIL
(
"unexpected message: "
<<
x
.
content
());
ints
.
emplace_back
(
x
.
content
().
get_as
<
int
>
(
0
));
ints
.
emplace_back
(
x
.
content
().
get_as
<
int
>
(
0
));
return
intrusive
::
task_result
::
resume
;
return
intrusive
::
task_result
::
resume
;
}
}
template
<
class
Key
,
class
Queue
,
class
...
Ts
>
template
<
class
Key
,
class
Queue
,
class
...
Ts
>
intrusive
::
task_result
operator
()(
const
Key
&
,
const
Queue
&
,
const
Ts
&
...)
{
intrusive
::
task_result
operator
()(
const
Key
&
,
const
Queue
&
,
const
Ts
&
...)
{
CAF_FAIL
(
"unex
e
pected message type"
);
// << typeid(Ts).name());
CAF_FAIL
(
"unexpected message type"
);
// << typeid(Ts).name());
return
intrusive
::
task_result
::
resume
;
return
intrusive
::
task_result
::
resume
;
}
}
};
};
...
...
libcaf_core/test/request_timeout.cpp
View file @
220f1ac3
...
@@ -273,7 +273,7 @@ CAF_TEST(single_timeout) {
...
@@ -273,7 +273,7 @@ CAF_TEST(single_timeout) {
{
ping_single3
,
"ping_single3"
}};
{
ping_single3
,
"ping_single3"
}};
for
(
auto
f
:
fs
)
{
for
(
auto
f
:
fs
)
{
bool
had_timeout
=
false
;
bool
had_timeout
=
false
;
CAF_MESSAGE
(
"test implemenation "
<<
f
.
second
);
CAF_MESSAGE
(
"test implemen
t
ation "
<<
f
.
second
);
auto
testee
=
sys
.
spawn
(
f
.
first
,
&
had_timeout
,
auto
testee
=
sys
.
spawn
(
f
.
first
,
&
had_timeout
,
sys
.
spawn
<
lazy_init
>
(
pong
));
sys
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
...
@@ -296,7 +296,7 @@ CAF_TEST(nested_timeout) {
...
@@ -296,7 +296,7 @@ CAF_TEST(nested_timeout) {
{
ping_nested3
,
"ping_nested3"
}};
{
ping_nested3
,
"ping_nested3"
}};
for
(
auto
f
:
fs
)
{
for
(
auto
f
:
fs
)
{
bool
had_timeout
=
false
;
bool
had_timeout
=
false
;
CAF_MESSAGE
(
"test implemenation "
<<
f
.
second
);
CAF_MESSAGE
(
"test implemen
t
ation "
<<
f
.
second
);
auto
testee
=
sys
.
spawn
(
f
.
first
,
&
had_timeout
,
auto
testee
=
sys
.
spawn
(
f
.
first
,
&
had_timeout
,
sys
.
spawn
<
lazy_init
>
(
pong
));
sys
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
...
@@ -325,7 +325,7 @@ CAF_TEST(multiplexed_timeout) {
...
@@ -325,7 +325,7 @@ CAF_TEST(multiplexed_timeout) {
{
ping_multiplexed3
,
"ping_multiplexed3"
}};
{
ping_multiplexed3
,
"ping_multiplexed3"
}};
for
(
auto
f
:
fs
)
{
for
(
auto
f
:
fs
)
{
bool
had_timeout
=
false
;
bool
had_timeout
=
false
;
CAF_MESSAGE
(
"test implemenation "
<<
f
.
second
);
CAF_MESSAGE
(
"test implemen
t
ation "
<<
f
.
second
);
auto
testee
=
sys
.
spawn
(
f
.
first
,
&
had_timeout
,
auto
testee
=
sys
.
spawn
(
f
.
first
,
&
had_timeout
,
sys
.
spawn
<
lazy_init
>
(
pong
));
sys
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
...
...
libcaf_io/caf/io/basp/all.hpp
View file @
220f1ac3
...
@@ -27,11 +27,11 @@
...
@@ -27,11 +27,11 @@
#include "caf/io/basp/routing_table.hpp"
#include "caf/io/basp/routing_table.hpp"
#include "caf/io/basp/version.hpp"
#include "caf/io/basp/version.hpp"
/// @defgroup BASP Binary Actor Sytem Protocol
/// @defgroup BASP Binary Actor Sy
s
tem Protocol
///
///
/// # Protocol Overview
/// # Protocol Overview
///
///
/// The "Binary Actor Sytem Protocol" (BASP) is **not** a network protocol.
/// The "Binary Actor Sy
s
tem Protocol" (BASP) is **not** a network protocol.
/// It is a specification for the "Remote Method Invocation" (RMI) interface
/// It is a specification for the "Remote Method Invocation" (RMI) interface
/// used by distributed instances of CAF. The purpose of BASP is unify the
/// used by distributed instances of CAF. The purpose of BASP is unify the
/// structure of RMI calls in order to simplify processing and implementation.
/// structure of RMI calls in order to simplify processing and implementation.
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
///
///
/// 
/// 
///
///
/// The figure above illustrates the phy
is
cal as well as the logical view
/// The figure above illustrates the phy
si
cal as well as the logical view
/// of a distributed CAF application. Note that the actors used for the
/// of a distributed CAF application. Note that the actors used for the
/// BASP communication ("BASP Brokers") are not part of the logical system
/// BASP communication ("BASP Brokers") are not part of the logical system
/// view and are in fact not visible to other actors. A BASP Broker creates
/// view and are in fact not visible to other actors. A BASP Broker creates
...
...
libcaf_io/caf/io/basp/header.hpp
View file @
220f1ac3
...
@@ -96,7 +96,7 @@ inline bool is_handshake(const header& hdr) {
...
@@ -96,7 +96,7 @@ inline bool is_handshake(const header& hdr) {
||
hdr
.
operation
==
message_type
::
client_handshake
;
||
hdr
.
operation
==
message_type
::
client_handshake
;
}
}
/// Checks wheter given header contains a heartbeat.
/// Checks whet
h
er given header contains a heartbeat.
inline
bool
is_heartbeat
(
const
header
&
hdr
)
{
inline
bool
is_heartbeat
(
const
header
&
hdr
)
{
return
hdr
.
operation
==
message_type
::
heartbeat
;
return
hdr
.
operation
==
message_type
::
heartbeat
;
}
}
...
...
libcaf_io/caf/io/basp/instance.hpp
View file @
220f1ac3
...
@@ -63,7 +63,7 @@ public:
...
@@ -63,7 +63,7 @@ public:
std
::
set
<
std
::
string
>&
sigs
)
=
0
;
std
::
set
<
std
::
string
>&
sigs
)
=
0
;
/// Called whenever a direct connection was closed or a
/// Called whenever a direct connection was closed or a
/// node became unrechable for other reasons *before*
/// node became unre
a
chable for other reasons *before*
/// this node gets erased from the routing table.
/// this node gets erased from the routing table.
/// @warning The implementing class must not modify the
/// @warning The implementing class must not modify the
/// routing table from this callback.
/// routing table from this callback.
...
@@ -116,7 +116,7 @@ public:
...
@@ -116,7 +116,7 @@ public:
instance
(
abstract_broker
*
parent
,
callee
&
lstnr
);
instance
(
abstract_broker
*
parent
,
callee
&
lstnr
);
/// Handles received data and returns a config for receiving the
/// Handles received data and returns a config for receiving the
/// next data or `none` if an error occured.
/// next data or `none` if an error occur
r
ed.
connection_state
handle
(
execution_unit
*
ctx
,
connection_state
handle
(
execution_unit
*
ctx
,
new_data_msg
&
dm
,
header
&
hdr
,
bool
is_payload
);
new_data_msg
&
dm
,
header
&
hdr
,
bool
is_payload
);
...
...
libcaf_io/caf/io/basp/worker.hpp
View file @
220f1ac3
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
// -- constructors, destructors, and assignment operators --------------------
// -- constructors, destructors, and assignment operators --------------------
/// Only the ::worker_hub has access to the construtor.
/// Only the ::worker_hub has access to the constru
c
tor.
worker
(
hub_type
&
hub
,
message_queue
&
queue
,
proxy_registry
&
proxies
);
worker
(
hub_type
&
hub
,
message_queue
&
queue
,
proxy_registry
&
proxies
);
~
worker
()
override
;
~
worker
()
override
;
...
...
libcaf_io/caf/io/middleman.hpp
View file @
220f1ac3
...
@@ -327,7 +327,7 @@ private:
...
@@ -327,7 +327,7 @@ private:
std
::
thread
thread_
;
std
::
thread
thread_
;
// keeps track of "singleton-like" brokers
// keeps track of "singleton-like" brokers
std
::
map
<
atom_value
,
actor
>
named_brokers_
;
std
::
map
<
atom_value
,
actor
>
named_brokers_
;
// actor offering asyncronous IO by managing this singleton instance
// actor offering async
h
ronous IO by managing this singleton instance
middleman_actor
manager_
;
middleman_actor
manager_
;
};
};
...
...
libcaf_io/caf/io/network/acceptor.hpp
View file @
220f1ac3
...
@@ -49,7 +49,7 @@ public:
...
@@ -49,7 +49,7 @@ public:
/// Starts this acceptor, forwarding all incoming connections to
/// Starts this acceptor, forwarding all incoming connections to
/// `manager`. The intrusive pointer will be released after the
/// `manager`. The intrusive pointer will be released after the
/// acceptor has been closed or an IO error occured.
/// acceptor has been closed or an IO error occur
r
ed.
void
start
(
acceptor_manager
*
mgr
);
void
start
(
acceptor_manager
*
mgr
);
/// Activates the acceptor.
/// Activates the acceptor.
...
...
libcaf_io/caf/io/network/datagram_handler.hpp
View file @
220f1ac3
...
@@ -59,7 +59,7 @@ public:
...
@@ -59,7 +59,7 @@ public:
/// @warning Not thread safe.
/// @warning Not thread safe.
void
write
(
datagram_handle
hdl
,
const
void
*
buf
,
size_t
num_bytes
);
void
write
(
datagram_handle
hdl
,
const
void
*
buf
,
size_t
num_bytes
);
/// Returns the write buffer of this enpoint.
/// Returns the write buffer of this en
d
point.
/// @warning Must not be modified outside the IO multiplexers event loop
/// @warning Must not be modified outside the IO multiplexers event loop
/// once the stream has been started.
/// once the stream has been started.
write_buffer_type
&
wr_buf
(
datagram_handle
hdl
)
{
write_buffer_type
&
wr_buf
(
datagram_handle
hdl
)
{
...
...
libcaf_io/caf/policy/tcp.hpp
View file @
220f1ac3
...
@@ -27,7 +27,7 @@ namespace caf::policy {
...
@@ -27,7 +27,7 @@ namespace caf::policy {
struct
tcp
{
struct
tcp
{
/// Reads up to `len` bytes from `fd,` writing the received data
/// Reads up to `len` bytes from `fd,` writing the received data
/// to `buf`. Returns `true` as long as `fd` is readable and `false`
/// to `buf`. Returns `true` as long as `fd` is readable and `false`
/// if the socket has been closed or an IO error occured. The number
/// if the socket has been closed or an IO error occur
r
ed. The number
/// of read bytes is stored in `result` (can be 0).
/// of read bytes is stored in `result` (can be 0).
static
io
::
network
::
rw_state
read_some
(
size_t
&
result
,
static
io
::
network
::
rw_state
read_some
(
size_t
&
result
,
io
::
network
::
native_socket
fd
,
io
::
network
::
native_socket
fd
,
...
@@ -35,7 +35,7 @@ struct tcp {
...
@@ -35,7 +35,7 @@ struct tcp {
/// Writes up to `len` bytes from `buf` to `fd`.
/// Writes up to `len` bytes from `buf` to `fd`.
/// Returns `true` as long as `fd` is readable and `false`
/// Returns `true` as long as `fd` is readable and `false`
/// if the socket has been closed or an IO error occured. The number
/// if the socket has been closed or an IO error occur
r
ed. The number
/// of written bytes is stored in `result` (can be 0).
/// of written bytes is stored in `result` (can be 0).
static
io
::
network
::
rw_state
write_some
(
size_t
&
result
,
static
io
::
network
::
rw_state
write_some
(
size_t
&
result
,
io
::
network
::
native_socket
fd
,
io
::
network
::
native_socket
fd
,
...
...
libcaf_io/src/io/network/default_multiplexer.cpp
View file @
220f1ac3
...
@@ -570,7 +570,7 @@ void default_multiplexer::handle_socket_event(native_socket fd, int mask,
...
@@ -570,7 +570,7 @@ void default_multiplexer::handle_socket_event(native_socket fd, int mask,
ptr
->
handle_event
(
operation
::
write
);
ptr
->
handle_event
(
operation
::
write
);
}
}
if
(
checkerror
&&
((
mask
&
error_mask
)
!=
0
))
{
if
(
checkerror
&&
((
mask
&
error_mask
)
!=
0
))
{
CAF_LOG_DEBUG
(
"error occured on socket:"
CAF_LOG_DEBUG
(
"error occur
r
ed on socket:"
<<
CAF_ARG
(
fd
)
<<
CAF_ARG
(
last_socket_error
())
<<
CAF_ARG
(
fd
)
<<
CAF_ARG
(
last_socket_error
())
<<
CAF_ARG
(
last_socket_error_as_string
()));
<<
CAF_ARG
(
last_socket_error_as_string
()));
ptr
->
handle_event
(
operation
::
propagate_error
);
ptr
->
handle_event
(
operation
::
propagate_error
);
...
...
libcaf_io/src/io/network/native_socket.cpp
View file @
220f1ac3
...
@@ -91,7 +91,7 @@ const int ec_out_of_memory = ENOMEM;
...
@@ -91,7 +91,7 @@ const int ec_out_of_memory = ENOMEM;
const
int
ec_interrupted_syscall
=
EINTR
;
const
int
ec_interrupted_syscall
=
EINTR
;
#endif
#endif
// Platform-dependent setup for supressing SIGPIPE.
// Platform-dependent setup for sup
p
ressing SIGPIPE.
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(__FreeBSD__)
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(__FreeBSD__)
// Set the SO_NOSIGPIPE socket option on macOS, iOS and FreeBSD.
// Set the SO_NOSIGPIPE socket option on macOS, iOS and FreeBSD.
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
...
...
libcaf_io/test/io/receive_buffer.cpp
View file @
220f1ac3
...
@@ -51,7 +51,7 @@ struct fixture {
...
@@ -51,7 +51,7 @@ struct fixture {
CAF_TEST_FIXTURE_SCOPE
(
receive_buffer_tests
,
fixture
)
CAF_TEST_FIXTURE_SCOPE
(
receive_buffer_tests
,
fixture
)
CAF_TEST
(
constuctors
)
{
CAF_TEST
(
const
r
uctors
)
{
CAF_CHECK_EQUAL
(
a
.
size
(),
0ul
);
CAF_CHECK_EQUAL
(
a
.
size
(),
0ul
);
CAF_CHECK_EQUAL
(
a
.
capacity
(),
0ul
);
CAF_CHECK_EQUAL
(
a
.
capacity
(),
0ul
);
CAF_CHECK_EQUAL
(
a
.
data
(),
nullptr
);
CAF_CHECK_EQUAL
(
a
.
data
(),
nullptr
);
...
...
libcaf_test/caf/test/dsl.hpp
View file @
220f1ac3
...
@@ -765,7 +765,7 @@ public:
...
@@ -765,7 +765,7 @@ public:
/// Consume messages and trigger timeouts until no activity remains.
/// Consume messages and trigger timeouts until no activity remains.
/// @returns The total number of events, i.e., messages consumed and
/// @returns The total number of events, i.e., messages consumed and
/// timeouts triggerd.
/// timeouts trigger
e
d.
size_t
run
()
{
size_t
run
()
{
return
run_until
([]
{
return
false
;
});
return
run_until
([]
{
return
false
;
});
}
}
...
...
libcaf_test/caf/test/unit_test.hpp
View file @
220f1ac3
...
@@ -417,7 +417,7 @@ public:
...
@@ -417,7 +417,7 @@ public:
/// @param not_suites_str Regular expression for excluding test suites.
/// @param not_suites_str Regular expression for excluding test suites.
/// @param tests_str Regular expression for individually selecting tests.
/// @param tests_str Regular expression for individually selecting tests.
/// @param not_tests_str Regular expression for individually disabling tests.
/// @param not_tests_str Regular expression for individually disabling tests.
/// @returns `true` if
f
all tests succeeded.
/// @returns `true` if all tests succeeded.
static
bool
run
(
bool
colorize
,
static
bool
run
(
bool
colorize
,
const
std
::
string
&
log_file
,
const
std
::
string
&
log_file
,
int
verbosity_console
,
int
verbosity_console
,
...
...
libcaf_test/caf/test/unit_test_impl.hpp
View file @
220f1ac3
...
@@ -341,7 +341,7 @@ bool engine::run(bool colorize,
...
@@ -341,7 +341,7 @@ bool engine::run(bool colorize,
auto
test_enabled
=
[
&
](
const
whitelist_type
&
whitelist
,
auto
test_enabled
=
[
&
](
const
whitelist_type
&
whitelist
,
const
blacklist_type
&
blacklist
,
const
blacklist_type
&
blacklist
,
const
test
&
x
)
{
const
test
&
x
)
{
// Disabled tests run if
f
explicitly requested by the user, i.e.,
// Disabled tests run if explicitly requested by the user, i.e.,
// tests_str is not the ".*" catch-all default.
// tests_str is not the ".*" catch-all default.
return
(
!
x
.
disabled
()
||
tests_str
!=
".*"
)
return
(
!
x
.
disabled
()
||
tests_str
!=
".*"
)
&&
enabled
(
whitelist
,
blacklist
,
x
.
name
());
&&
enabled
(
whitelist
,
blacklist
,
x
.
name
());
...
...
scripts/caf-prof
View file @
220f1ac3
...
@@ -97,7 +97,7 @@ log_magic_trans <- function(base=10) {
...
@@ -97,7 +97,7 @@ log_magic_trans <- function(base=10) {
log_breaks
(
base
=
base
),
domain
=
c
(
0
,
Inf
))
log_breaks
(
base
=
base
),
domain
=
c
(
0
,
Inf
))
}
}
# Dy
an
mic time scale that flips to logarithmic if our data is more than two
# Dy
na
mic time scale that flips to logarithmic if our data is more than two
# orders of magnitude apart.
# orders of magnitude apart.
scale_time
<-
function
(
.data
,
fun
)
{
scale_time
<-
function
(
.data
,
fun
)
{
trans
<-
NULL
trans
<-
NULL
...
@@ -253,7 +253,7 @@ plot_time_barplot <- function(.data) {
...
@@ -253,7 +253,7 @@ plot_time_barplot <- function(.data) {
scale_y_continuous
(
name
=
"CPU time"
,
breaks
=
ticks
,
scale_y_continuous
(
name
=
"CPU time"
,
breaks
=
ticks
,
labels
=
make_usec_labels
(
ticks
))
+
labels
=
make_usec_labels
(
ticks
))
+
scale_fill_manual
(
name
=
"CPU time"
,
values
=
rev
(
color_hue
(
2
)),
scale_fill_manual
(
name
=
"CPU time"
,
values
=
rev
(
color_hue
(
2
)),
labels
=
c
(
"User"
,
"Sytem"
))
+
labels
=
c
(
"User"
,
"Sy
s
tem"
))
+
theme
(
axis.text.x
=
element_text
(
angle
=
90
,
vjust
=
.5
,
hjust
=
1
),
theme
(
axis.text.x
=
element_text
(
angle
=
90
,
vjust
=
.5
,
hjust
=
1
),
legend.justification
=
c
(
1
,
1
),
legend.position
=
c
(
1
,
1
))
legend.justification
=
c
(
1
,
1
),
legend.position
=
c
(
1
,
1
))
}
}
...
...
scripts/obs-commit-version.sh
View file @
220f1ac3
...
@@ -119,6 +119,6 @@ sed -i.bk -E \
...
@@ -119,6 +119,6 @@ sed -i.bk -E \
"
$packageName
.spec"
\
"
$packageName
.spec"
\
"
$packageName
.dsc"
"
$packageName
.dsc"
echo
"[obs-commit-version] Comitting:
$packageVersion
,
$1
"
echo
"[obs-commit-version] Com
m
itting:
$packageVersion
,
$1
"
osc commit
-m
"Automatic commit:
$packageVersion
,
$1
"
osc commit
-m
"Automatic commit:
$packageVersion
,
$1
"
tools/caf-vec.cpp
View file @
220f1ac3
...
@@ -356,7 +356,7 @@ struct log_entry {
...
@@ -356,7 +356,7 @@ struct log_entry {
string
component
;
string
component
;
/// Severity level of this entry.
/// Severity level of this entry.
log_level
level
;
log_level
level
;
/// ID of the logging entit
i
y.
/// ID of the logging entity.
logger_id
id
;
logger_id
id
;
/// Context information about currently active class.
/// Context information about currently active class.
string
class_name
;
string
class_name
;
...
...
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