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
bac72820
Commit
bac72820
authored
Nov 19, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch master into topic/serialization
parents
1849151e
78f54969
Changes
66
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
729 additions
and
109 deletions
+729
-109
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
+6
-6
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
+626
-0
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
+6
-6
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
+0
-2
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
+2
-2
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
+0
-2
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
-4
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
+3
-3
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
+2
-3
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 @
bac72820
...
...
@@ -415,7 +415,7 @@ add_custom_command(TARGET uninstall
"
${
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
...
...
@@ -480,7 +480,7 @@ endmacro()
macro
(
add_optional_caf_binaries name
)
string
(
TOUPPER
${
name
}
upper_name
)
set
(
dependency_failed no
)
# check all aditional dependency flags
# check all ad
d
itional dependency flags
foreach
(
flag_name
${
ARGN
}
)
if
(
${
flag_name
}
)
set
(
dependency_failed yes
)
...
...
doc/tex/CommonPitfalls.tex
View file @
bac72820
...
...
@@ -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
the lifetime guarantee is by storing the data in smart pointers such as
\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.
examples/broker/simple_broker.cpp
View file @
bac72820
...
...
@@ -103,7 +103,7 @@ void read_int(const void* data, uint64_t& storage) {
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
)
{
// we assume io_fsm manages a broker with exactly one connection,
// i.e., the connection ponted to by `hdl`
...
...
examples/remoting/distributed_calculator.cpp
View file @
bac72820
...
...
@@ -75,7 +75,7 @@ behavior calculator_fun() {
namespace
client
{
// a simple calculat
e
r task: operation + operands
// a simple calculat
o
r task: operation + operands
struct
task
{
atom_value
op
;
int
lhs
;
...
...
libcaf_core/caf/abstract_actor.hpp
View file @
bac72820
...
...
@@ -81,7 +81,7 @@ public:
virtual
void
attach
(
attachable_ptr
ptr
)
=
0
;
/// 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
>
void
attach_functor
(
F
f
)
{
attach
(
attachable_ptr
{
new
detail
::
functor_attachable
<
F
>
(
std
::
move
(
f
))});
...
...
@@ -222,7 +222,7 @@ protected:
mutable
std
::
mutex
mtx_
;
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
);
abstract_actor
(
const
abstract_actor
&
)
=
delete
;
...
...
libcaf_core/caf/actor_profiler.hpp
View file @
bac72820
...
...
@@ -77,7 +77,7 @@ public:
virtual
void
before_sending
(
const
local_actor
&
self
,
mailbox_element
&
element
)
=
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`.
/// @param self The current actor.
/// @param timeout Time point for the message delivery.
...
...
libcaf_core/caf/actor_system.hpp
View file @
bac72820
...
...
@@ -121,7 +121,7 @@ public:
friend
class
net
::
middleman
;
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
;
/// Returns the ID of an internal actor by its name.
...
...
@@ -594,7 +594,7 @@ private:
template
<
class
T
>
void
check_invariants
()
{
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."
);
}
...
...
libcaf_core/caf/all.hpp
View file @
bac72820
...
...
@@ -203,7 +203,7 @@
/// Contains classes and functions used for network abstraction.
///
/// @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
///
...
...
@@ -287,11 +287,11 @@
///
/// @section Atoms Atoms
///
/// Atoms are a nice way to add semantic information
s to a message.
///
Assuming an actor wants to provide a "math sevice" for integers. It
///
could provide operations such as addition, subtraction, etc.
///
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.
/// Atoms are a nice way to add semantic information
to a message. Assuming an
///
actor wants to provide a "math service" for integers. It could provide
///
operations such as addition, subtraction, etc. 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.
///
/// Example actor:
/// ~~
...
...
libcaf_core/caf/binary_deserializer.hpp
View file @
bac72820
...
...
@@ -87,7 +87,7 @@ public:
/// @pre `num_bytes <= remaining()`
void
skip
(
size_t
num_bytes
)
noexcept
;
/// Assi
ng
s a new input.
/// Assi
gn
s a new input.
void
reset
(
span
<
const
byte
>
bytes
)
noexcept
;
/// Returns the current read position.
...
...
libcaf_core/caf/data_processor.hpp
0 → 100644
View file @
bac72820
This diff is collapsed.
Click to expand it.
libcaf_core/caf/detail/delegate_serialize.hpp
View file @
bac72820
...
...
@@ -17,7 +17,7 @@
******************************************************************************/
// 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:
// - allow users to integrate existing boost.serialization-based code easily
// - allow to switch out this header with the actual boost header in boost.actor
...
...
libcaf_core/caf/detail/invoke_result_visitor.hpp
View file @
bac72820
...
...
@@ -120,7 +120,7 @@ public:
(
*
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)()`.
inline
void
operator
()(
response_promise
&
)
{
...
...
libcaf_core/caf/detail/is_one_of.hpp
View file @
bac72820
...
...
@@ -22,7 +22,7 @@
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
>
struct
is_one_of
;
...
...
libcaf_core/caf/detail/is_primitive_config_value.hpp
View file @
bac72820
...
...
@@ -39,7 +39,7 @@ enum class atom_value : uint64_t;
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
>
using
is_primitive_config_value
=
is_one_of
<
T
,
int64_t
,
bool
,
double
,
atom_value
,
timespan
,
std
::
string
,
...
...
libcaf_core/caf/detail/set_thread_name.hpp
View file @
bac72820
...
...
@@ -20,7 +20,7 @@
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).
void
set_thread_name
(
const
char
*
name
);
...
...
libcaf_core/caf/detail/type_list.hpp
View file @
bac72820
...
...
@@ -414,7 +414,7 @@ struct tl_reverse_impl<empty_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
>
struct
tl_reverse
{
using
type
=
typename
tl_reverse_impl
<
List
>::
type
;
...
...
@@ -704,7 +704,7 @@ struct tl_map_conditional<empty_type_list, Trait, TraitResult, Funs...> {
// 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
>
struct
tl_pop_back
{
using
type
=
typename
tl_slice
<
List
,
0
,
tl_size
<
List
>::
value
-
1
>::
type
;
...
...
libcaf_core/caf/detail/type_traits.hpp
View file @
bac72820
...
...
@@ -207,7 +207,7 @@ public:
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
>
class
is_forward_iterator
{
template
<
class
C
>
...
...
@@ -361,7 +361,7 @@ struct get_callable_trait : get_callable_trait_helper<decay_t<T>> {};
template
<
class
T
>
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
>
struct
is_callable
{
template
<
class
C
>
...
...
@@ -375,7 +375,7 @@ public:
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
>
struct
is_callable_with
{
template
<
class
U
>
...
...
@@ -389,7 +389,7 @@ struct is_callable_with {
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
/// mutable references.
...
...
@@ -427,11 +427,11 @@ private:
// 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
>
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
*
);
public:
...
...
libcaf_core/caf/fused_downstream_manager.hpp
View file @
bac72820
...
...
@@ -112,7 +112,7 @@ public:
/// Unique pointer to an outbound path.
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
...
>
;
/// State held for each slot.
...
...
libcaf_core/caf/intrusive/lifo_inbox.hpp
View file @
bac72820
...
...
@@ -255,19 +255,19 @@ public:
private:
static
constexpr
pointer
stack_empty_tag
()
{
// 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
);
}
pointer
stack_closed_tag
()
const
noexcept
{
// 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
);
}
pointer
reader_blocked_tag
()
const
noexcept
{
// 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.
return
reinterpret_cast
<
pointer
>
(
const_cast
<
lifo_inbox
*>
(
this
));
}
...
...
libcaf_core/caf/logger.hpp
View file @
bac72820
...
...
@@ -151,7 +151,7 @@ public:
timestamp
tstamp
;
};
/// Internal representation of format string entites.
/// Internal representation of format string entit
i
es.
enum
field_type
{
invalid_field
,
category_field
,
...
...
@@ -406,11 +406,11 @@ bool operator==(const logger::field& x, const logger::field& y);
// -- utility macros -----------------------------------------------------------
#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.
# define CAF_PRETTY_FUN __FUNCSIG__
#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.
# define CAF_PRETTY_FUN __PRETTY_FUNCTION__
#endif // CAF_MSVC
...
...
libcaf_core/caf/make_config_option.hpp
View file @
bac72820
...
...
@@ -99,7 +99,7 @@ config_option make_config_option(T& storage, string_view category,
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`.
config_option
make_negated_config_option
(
bool
&
storage
,
string_view
category
,
...
...
libcaf_core/caf/memory_managed.hpp
View file @
bac72820
...
...
@@ -26,7 +26,7 @@ namespace caf {
class
memory_managed
{
public:
/// 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.
/// @param decremented_rc Indicates whether the caller did reduce the
/// reference of this object before calling this member
...
...
libcaf_core/caf/message.hpp
View file @
bac72820
...
...
@@ -192,8 +192,6 @@ private:
data_ptr
vals_
;
};
// -- nested types -------------------------------------------------------------
// -- related non-members ------------------------------------------------------
/// @relates message
...
...
libcaf_core/caf/message_builder.hpp
View file @
bac72820
...
...
@@ -27,7 +27,7 @@
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`.
class
message_builder
{
public:
...
...
libcaf_core/caf/monitorable_actor.hpp
View file @
bac72820
...
...
@@ -102,7 +102,7 @@ public:
protected:
/// 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.
virtual
void
on_cleanup
(
const
error
&
reason
);
...
...
libcaf_core/caf/parser_state.hpp
View file @
bac72820
...
...
@@ -27,7 +27,7 @@
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
>
struct
parser_state
{
/// Current position of the parser.
...
...
libcaf_core/caf/pec.hpp
View file @
bac72820
...
...
@@ -59,7 +59,7 @@ enum class pec : uint8_t {
type_mismatch
,
/// Stopped at an unrecognized option name.
not_an_option
,
/// Stopped at an unpars
e
able argument.
/// Stopped at an unparsable argument.
illegal_argument
=
15
,
/// Stopped because an argument was omitted.
missing_argument
,
...
...
libcaf_core/caf/policy/work_stealing.hpp
View file @
bac72820
...
...
@@ -134,7 +134,7 @@ public:
template
<
class
Worker
>
resumable
*
dequeue
(
Worker
*
self
)
{
// 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
// dequeue attempts
auto
&
strategies
=
d
(
self
).
strategies
;
...
...
@@ -153,8 +153,8 @@ public:
}
if
(
strategies
[
k
].
sleep_duration
.
count
()
>
0
)
{
#ifdef CAF_MSVC
// Windows cannot sleep less than 1000 us, so timeout is conve
ted to 0
// inside sleep_for(), but Sleep(0) is dangerous so replace it with
// Windows cannot sleep less than 1000 us, so timeout is conve
rted to
//
0
inside sleep_for(), but Sleep(0) is dangerous so replace it with
// yield()
if
(
strategies
[
k
].
sleep_duration
.
count
()
<
1000
)
std
::
this_thread
::
yield
();
...
...
libcaf_core/caf/spawn_options.hpp
View file @
bac72820
...
...
@@ -67,43 +67,43 @@ constexpr spawn_options hidden = spawn_options::hide_flag;
/// initialization until a message arrives.
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
constexpr
bool
has_spawn_option
(
spawn_options
haystack
,
spawn_options
needle
)
{
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
constexpr
bool
has_detach_flag
(
spawn_options
opts
)
{
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
constexpr
bool
has_priority_aware_flag
(
spawn_options
)
{
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
constexpr
bool
has_hide_flag
(
spawn_options
opts
)
{
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
constexpr
bool
has_link_flag
(
spawn_options
opts
)
{
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
constexpr
bool
has_monitor_flag
(
spawn_options
opts
)
{
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
constexpr
bool
has_lazy_init_flag
(
spawn_options
opts
)
{
return
has_spawn_option
(
opts
,
lazy_init
);
...
...
libcaf_core/caf/stateful_actor.hpp
View file @
bac72820
...
...
@@ -33,7 +33,7 @@ namespace caf {
/// An event-based actor with managed state. The state is constructed
/// before `make_behavior` will get called and destroyed after the
/// 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.
template
<
class
State
,
class
Base
/* = event_based_actor (see fwd.hpp) */
>
class
stateful_actor
:
public
Base
{
...
...
libcaf_core/caf/string_view.hpp
View file @
bac72820
...
...
@@ -31,7 +31,7 @@ namespace caf {
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.
template
<
class
T
>
struct
is_string_like
{
...
...
@@ -212,7 +212,7 @@ public:
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
;
...
...
libcaf_core/caf/typed_behavior.hpp
View file @
bac72820
...
...
@@ -114,7 +114,7 @@ struct valid_input {
// this function is called from typed_behavior<...>::set and its whole
// 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
>
void
static_check_typed_behavior_input
()
{
constexpr
bool
is_valid
=
valid_input
<
SignatureList
,
InputList
>::
value
;
...
...
libcaf_core/src/actor_system_config.cpp
View file @
bac72820
...
...
@@ -106,10 +106,10 @@ actor_system_config::actor_system_config()
opt_group
{
custom_options_
,
"logger"
}
.
add
<
atom_value
>
(
"verbosity"
,
"default verbosity for file and console"
)
.
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
>
(
"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
<
std
::
vector
<
atom_value
>>
(
"component-blacklist"
,
"excluded components for logging"
)
...
...
libcaf_core/src/config_option_set.cpp
View file @
bac72820
...
...
@@ -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
{
//<--- argument --------> <---- desc
iption -
--->
//<--- argument --------> <---- desc
ription
--->
// (-w|--write) <string> : output file
auto
build_argument
=
[](
const
config_option
&
x
)
{
string_builder
sb
;
...
...
libcaf_core/src/logger.cpp
View file @
bac72820
...
...
@@ -409,7 +409,7 @@ void logger::render_fun_prefix(std::ostream& out, const event& x) {
// ^~~~~~~~~~~~~
// Here, we output Java-style "my.namespace" to `out`.
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
)
{
if
(
starts_with
(
reduced
,
str
))
{
reduced
.
remove_prefix
(
str
.
size
());
...
...
libcaf_core/src/message.cpp
View file @
bac72820
...
...
@@ -255,8 +255,6 @@ void message::reset(raw_ptr new_ptr, bool add_ref) noexcept {
vals_
.
reset
(
new_ptr
,
add_ref
);
}
// -- related non-members ------------------------------------------------------
error
inspect
(
serializer
&
sink
,
message
&
msg
)
{
return
msg
.
save
(
sink
);
}
...
...
libcaf_core/src/replies_to.cpp
View file @
bac72820
...
...
@@ -29,7 +29,7 @@ std::string replies_to_type_name(size_t input_size,
std
::
string
result
;
// 'void' is not an announced type, hence we check whether uniform_typeid
// 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
+=
join
(
input
,
input
+
input_size
,
glue
);
result
+=
">::with<"
;
...
...
libcaf_core/src/scheduled_actor.cpp
View file @
bac72820
...
...
@@ -460,7 +460,7 @@ void scheduled_actor::quit(error x) {
for
(
auto
i
=
managers
.
begin
();
i
!=
e
;
++
i
)
{
auto
&
mgr
=
*
i
;
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
())
{
mgr
->
stop
();
erase_stream_manager
(
mgr
);
...
...
@@ -1076,7 +1076,7 @@ void scheduled_actor::erase_stream_manager(const stream_manager_ptr& mgr) {
invoke_message_result
scheduled_actor
::
handle_open_stream_msg
(
mailbox_element
&
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
{
void
operator
()()
override
{
// nop
...
...
libcaf_core/src/string_view.cpp
View file @
bac72820
...
...
@@ -83,7 +83,7 @@ void string_view::assign(const_pointer data, size_type len) {
size_
=
len
;
}
// -- algor
ti
hms ---------------------------------------------------------------
// -- algor
it
hms ---------------------------------------------------------------
string_view
::
size_type
string_view
::
copy
(
pointer
dest
,
size_type
n
,
size_type
pos
)
const
{
...
...
libcaf_core/test/actor_lifetime.cpp
View file @
bac72820
...
...
@@ -184,7 +184,7 @@ struct fixture {
}
// namespace
CAF_TEST
(
destructor_call
)
{
{
// lifetime scope of actor syst
me
{
// lifetime scope of actor syst
em
actor_system_config
cfg
;
actor_system
system
{
cfg
};
system
.
spawn
<
testee
>
();
...
...
libcaf_core/test/handles.cpp
View file @
bac72820
...
...
@@ -57,7 +57,7 @@ struct handle_set {
actor_addr
wh
;
// Dynamically typed handle to the actor.
actor
dt
;
// Staically typed handle to the actor.
// Sta
t
ically typed handle to the actor.
testee_actor
st
;
handle_set
()
=
default
;
...
...
libcaf_core/test/intrusive_ptr.cpp
View file @
bac72820
...
...
@@ -21,7 +21,7 @@
#define CAF_SUITE intrusive_ptr
#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
#include <vector>
...
...
libcaf_core/test/ipv4_subnet.cpp
View file @
bac72820
...
...
@@ -54,7 +54,7 @@ CAF_TEST(equality) {
CAF_CHECK_EQUAL
(
a
,
b
);
}
CAF_TEST
(
con
s
tains
)
{
CAF_TEST
(
contains
)
{
ipv4_subnet
local
{
addr
(
127
,
0
,
0
,
0
),
8
};
CAF_CHECK
(
local
.
contains
(
addr
(
127
,
0
,
0
,
1
)));
CAF_CHECK
(
local
.
contains
(
addr
(
127
,
1
,
2
,
3
)));
...
...
libcaf_core/test/ipv6_subnet.cpp
View file @
bac72820
...
...
@@ -49,7 +49,7 @@ CAF_TEST(equality) {
CAF_CHECK_EQUAL
(
a
,
b
);
}
CAF_TEST
(
con
s
tains
)
{
CAF_TEST
(
contains
)
{
auto
local
=
ipv6_address
{{
0xbebe
,
0xbebe
},
{}}
/
32
;
CAF_CHECK
(
local
.
contains
(
ipv6_address
({
0xbebe
,
0xbebe
,
0xbebe
},
{})));
CAF_CHECK
(
!
local
.
contains
(
ipv6_address
({
0xbebe
,
0xbebf
},
{})));
...
...
libcaf_core/test/logger.cpp
View file @
bac72820
...
...
@@ -53,7 +53,7 @@ void global_fun() {
// Clang expands template parameters in __PRETTY_FUNCTION__, while GCC does
// 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
// us always the same ou
pt
ut for the prefix.
// us always the same ou
tp
ut for the prefix.
struct
T
{};
namespace
{
...
...
libcaf_core/test/make_config_value_field.cpp
View file @
bac72820
...
...
@@ -203,7 +203,7 @@ CAF_TEST(getter and setter access) {
test_foo_field
(
foo_field
);
}
CAF_TEST
(
oject
access
from
dictionary
-
foobar
)
{
CAF_TEST
(
o
b
ject
access
from
dictionary
-
foobar
)
{
settings
x
;
put
(
x
,
"my-value.bar"
,
"hello"
);
CAF_MESSAGE
(
"without foo member"
);
...
...
@@ -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
;
put
(
x
,
"my-value.x.foo"
,
1
);
put
(
x
,
"my-value.x.bar"
,
"hello"
);
...
...
libcaf_core/test/native_streaming_classes.cpp
View file @
bac72820
...
...
@@ -661,7 +661,7 @@ CAF_TEST(depth_3_pipeline_2000_items) {
loop
(
alice
,
bob
);
CAF_CHECK_NOT_EQUAL
(
bob
.
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
// becoming uncongested again
loop
(
bob
,
carl
);
...
...
libcaf_core/test/policy/categorized.cpp
View file @
bac72820
...
...
@@ -68,14 +68,14 @@ struct consumer {
intrusive
::
task_result
operator
()(
const
Key
&
,
const
Queue
&
,
const
mailbox_element
&
x
)
{
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
));
return
intrusive
::
task_result
::
resume
;
}
template
<
class
Key
,
class
Queue
,
class
...
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
;
}
};
...
...
libcaf_core/test/request_timeout.cpp
View file @
bac72820
...
...
@@ -273,7 +273,7 @@ CAF_TEST(single_timeout) {
{
ping_single3
,
"ping_single3"
}};
for
(
auto
f
:
fs
)
{
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
,
sys
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
...
...
@@ -296,7 +296,7 @@ CAF_TEST(nested_timeout) {
{
ping_nested3
,
"ping_nested3"
}};
for
(
auto
f
:
fs
)
{
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
,
sys
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
...
...
@@ -325,7 +325,7 @@ CAF_TEST(multiplexed_timeout) {
{
ping_multiplexed3
,
"ping_multiplexed3"
}};
for
(
auto
f
:
fs
)
{
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
,
sys
.
spawn
<
lazy_init
>
(
pong
));
CAF_REQUIRE_EQUAL
(
sched
.
jobs
.
size
(),
1u
);
...
...
libcaf_io/caf/io/basp/all.hpp
View file @
bac72820
...
...
@@ -26,11 +26,11 @@
#include "caf/io/basp/routing_table.hpp"
#include "caf/io/basp/version.hpp"
/// @defgroup BASP Binary Actor Sytem Protocol
/// @defgroup BASP Binary Actor Sy
s
tem Protocol
///
/// # 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
/// used by distributed instances of CAF. The purpose of BASP is unify the
/// structure of RMI calls in order to simplify processing and implementation.
...
...
@@ -43,7 +43,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
/// 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
...
...
@@ -140,4 +140,3 @@
/// of {@link message_type} below.
///
/// 
libcaf_io/caf/io/basp/header.hpp
View file @
bac72820
...
...
@@ -96,7 +96,7 @@ inline bool is_handshake(const header& hdr) {
||
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
)
{
return
hdr
.
operation
==
message_type
::
heartbeat
;
}
...
...
libcaf_io/caf/io/basp/instance.hpp
View file @
bac72820
...
...
@@ -59,7 +59,7 @@ public:
=
0
;
/// 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.
/// @warning The implementing class must not modify the
/// routing table from this callback.
...
...
@@ -115,8 +115,8 @@ public:
/// Handles received data and returns a config for receiving the
/// next data or `none` if an error occured.
connection_state
handle
(
execution_unit
*
ctx
,
new_data_msg
&
dm
,
header
&
hdr
,
bool
is_payload
);
connection_state
handle
(
execution_unit
*
ctx
,
new_data_msg
&
dm
,
header
&
hdr
,
bool
is_payload
);
/// Sends heartbeat messages to all valid nodes those are directly connected.
void
handle_heartbeat
(
execution_unit
*
ctx
);
...
...
libcaf_io/caf/io/basp/worker.hpp
View file @
bac72820
...
...
@@ -53,7 +53,7 @@ public:
// -- 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
()
override
;
...
...
libcaf_io/caf/io/middleman.hpp
View file @
bac72820
...
...
@@ -327,7 +327,7 @@ private:
std
::
thread
thread_
;
// keeps track of "singleton-like" 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_
;
};
...
...
libcaf_io/caf/io/network/acceptor.hpp
View file @
bac72820
...
...
@@ -49,7 +49,7 @@ public:
/// Starts this acceptor, forwarding all incoming connections to
/// `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
);
/// Activates the acceptor.
...
...
libcaf_io/caf/io/network/datagram_handler.hpp
View file @
bac72820
...
...
@@ -56,7 +56,7 @@ public:
/// @warning Not thread safe.
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
/// once the stream has been started.
byte_buffer
&
wr_buf
(
datagram_handle
hdl
)
{
...
...
libcaf_io/caf/policy/tcp.hpp
View file @
bac72820
...
...
@@ -27,7 +27,7 @@ namespace caf::policy {
struct
tcp
{
/// Reads up to `len` bytes from `fd,` writing the received data
/// 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).
static
io
::
network
::
rw_state
read_some
(
size_t
&
result
,
io
::
network
::
native_socket
fd
,
...
...
@@ -35,7 +35,7 @@ struct tcp {
/// Writes up to `len` bytes from `buf` to `fd`.
/// 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).
static
io
::
network
::
rw_state
write_some
(
size_t
&
result
,
io
::
network
::
native_socket
fd
,
...
...
libcaf_io/src/io/network/default_multiplexer.cpp
View file @
bac72820
...
...
@@ -570,7 +570,7 @@ void default_multiplexer::handle_socket_event(native_socket fd, int mask,
ptr
->
handle_event
(
operation
::
write
);
}
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
(
last_socket_error_as_string
()));
ptr
->
handle_event
(
operation
::
propagate_error
);
...
...
libcaf_io/src/io/network/native_socket.cpp
View file @
bac72820
...
...
@@ -91,7 +91,7 @@ const int ec_out_of_memory = ENOMEM;
const
int
ec_interrupted_syscall
=
EINTR
;
#endif
// Platform-dependent setup for supressing SIGPIPE.
// Platform-dependent setup for sup
p
ressing SIGPIPE.
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(__FreeBSD__)
// Set the SO_NOSIGPIPE socket option on macOS, iOS and FreeBSD.
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
...
...
libcaf_io/test/io/receive_buffer.cpp
View file @
bac72820
...
...
@@ -51,7 +51,7 @@ struct 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
.
capacity
(),
0ul
);
CAF_CHECK_EQUAL
(
a
.
data
(),
nullptr
);
...
...
libcaf_test/caf/test/dsl.hpp
View file @
bac72820
...
...
@@ -764,7 +764,7 @@ public:
/// Consume messages and trigger timeouts until no activity remains.
/// @returns The total number of events, i.e., messages consumed and
/// timeouts triggerd.
/// timeouts trigger
e
d.
size_t
run
()
{
return
run_until
([]
{
return
false
;
});
}
...
...
libcaf_test/caf/test/unit_test.hpp
View file @
bac72820
...
...
@@ -417,7 +417,7 @@ public:
/// @param not_suites_str Regular expression for excluding test suites.
/// @param tests_str Regular expression for individually selecting 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
,
const
std
::
string
&
log_file
,
int
verbosity_console
,
...
...
libcaf_test/caf/test/unit_test_impl.hpp
View file @
bac72820
...
...
@@ -340,9 +340,8 @@ bool engine::run(bool colorize,
};
# endif
auto
test_enabled
=
[
&
](
const
whitelist_type
&
whitelist
,
const
blacklist_type
&
blacklist
,
const
test
&
x
)
{
// Disabled tests run iff explicitly requested by the user, i.e.,
const
blacklist_type
&
blacklist
,
const
test
&
x
)
{
// Disabled tests run if explicitly requested by the user, i.e.,
// tests_str is not the ".*" catch-all default.
return
(
!
x
.
disabled
()
||
tests_str
!=
".*"
)
&&
enabled
(
whitelist
,
blacklist
,
x
.
name
());
...
...
scripts/caf-prof
View file @
bac72820
...
...
@@ -97,7 +97,7 @@ log_magic_trans <- function(base=10) {
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.
scale_time
<-
function
(
.data
,
fun
)
{
trans
<-
NULL
...
...
@@ -253,7 +253,7 @@ plot_time_barplot <- function(.data) {
scale_y_continuous
(
name
=
"CPU time"
,
breaks
=
ticks
,
labels
=
make_usec_labels
(
ticks
))
+
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
),
legend.justification
=
c
(
1
,
1
),
legend.position
=
c
(
1
,
1
))
}
...
...
scripts/obs-commit-version.sh
View file @
bac72820
...
...
@@ -119,6 +119,6 @@ sed -i.bk -E \
"
$packageName
.spec"
\
"
$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
"
tools/caf-vec.cpp
View file @
bac72820
...
...
@@ -356,7 +356,7 @@ struct log_entry {
string
component
;
/// Severity level of this entry.
log_level
level
;
/// ID of the logging entit
i
y.
/// ID of the logging entity.
logger_id
id
;
/// Context information about currently active class.
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