Commit 220f1ac3 authored by Dominik Charousset's avatar Dominik Charousset

Merge pull request #974

parents 2cb70865 20a148fc
...@@ -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 inclue paths for subprojects # # set include 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 additional dependency flags
foreach(flag_name ${ARGN}) foreach(flag_name ${ARGN})
if(${flag_name}) if(${flag_name})
set(dependency_failed yes) set(dependency_failed yes)
......
...@@ -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
informations 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.
...@@ -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 // implementation 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`
......
...@@ -75,7 +75,7 @@ behavior calculator_fun() { ...@@ -75,7 +75,7 @@ behavior calculator_fun() {
namespace client { namespace client {
// a simple calculater task: operation + operands // a simple calculator task: operation + operands
struct task { struct task {
atom_value op; atom_value op;
int lhs; int lhs;
......
...@@ -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 immediatley if it is not running. /// actor executes `f()` on exit or immediately 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, assignments, 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;
......
...@@ -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;
/// Analoguous 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.
......
...@@ -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 implicitly 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 throught 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.");
} }
......
...@@ -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 System 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 informations 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 service" 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.
......
...@@ -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);
/// Assings a new input. /// Assigns a new input.
void reset(span<const byte> bytes); void reset(span<const byte> bytes);
protected: protected:
......
...@@ -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 plattforms 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};
......
...@@ -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 compatbile to boost.serialization. In particular, the // that is compatible 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
......
...@@ -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 procude results -------------------- // -- special-purpose handlers that don't produce results --------------------
/// Calls `(*this)()`. /// Calls `(*this)()`.
inline void operator()(response_promise&) { inline void operator()(response_promise&) {
......
...@@ -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 whether `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;
......
...@@ -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 whether `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,
......
...@@ -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 plattforms /// 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);
......
...@@ -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 with 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 with 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;
......
...@@ -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 whether `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 whether `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 whether `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 whether `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 whether `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 ambigious // picked for any U without requested member since `U::name` is not ambiguous
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 ambigious // picked for any U with requested member since `U::name` is ambiguous
static int fun(void*); static int fun(void*);
public: public:
......
...@@ -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 template 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.
......
...@@ -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 whether 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 whether 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 whether 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));
} }
......
...@@ -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 entities.
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 funciton name that /// Expands to a string representation of the current function 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 funciton name that /// Expands to a string representation of the current function 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
......
...@@ -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 compatbility, do not use for new code ! ------------------------- // -- backward compatibility, 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,
......
...@@ -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 overridden 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
......
...@@ -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. /// Description 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.
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
namespace caf { namespace caf {
/// Provides a convenient interface for createing `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:
......
...@@ -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 section 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);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
namespace caf { namespace caf {
/// Stores all informations 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.
......
...@@ -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 unparseable 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,
......
...@@ -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 aggressive
// 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 conveted to 0 // Windows cannot sleep less than 1000 us, so timeout is converted 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();
......
...@@ -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 whether `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 whether 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 whether 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 whether 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 whether 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 whether 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 whether 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);
......
...@@ -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 ressources 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 {
......
...@@ -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 mimicking 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);
// -- algortihms ------------------------------------------------------------- // -- algorithms -------------------------------------------------------------
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;
......
...@@ -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 informations 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;
......
...@@ -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 entires") .add<string>("file-format", "line format for individual log file entries")
.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 entires") .add<string>("console-format", "line format for printed log entries")
.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 lenght of all options // maximum string length 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();
......
...@@ -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 --------> <---- desciption ----> //<--- argument --------> <---- description --->
// (-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;
......
...@@ -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 preceed the return type. // Skip all prefixes that can precede 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());
......
...@@ -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 frist remainder indicator // drop first remainder indicator
return none; return none;
} }
if (arg.empty() || arg.front() != '-') { if (arg.empty() || arg.front() != '-') {
......
...@@ -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 catched anyways) // possibility of false positives, but those will be caught 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<";
......
...@@ -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 continuous.
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 manager from a behavior.
struct visitor : detail::invoke_result_visitor { struct visitor : detail::invoke_result_visitor {
void operator()() override { void operator()() override {
// nop // nop
......
...@@ -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;
} }
// -- algortihms --------------------------------------------------------------- // -- algorithms ---------------------------------------------------------------
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 {
......
...@@ -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 systme { // lifetime scope of actor system
actor_system_config cfg; actor_system_config cfg;
actor_system system{cfg}; actor_system system{cfg};
system.spawn<testee>(); system.spawn<testee>();
......
...@@ -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. // Statically typed handle to the actor.
testee_actor st; testee_actor st;
handle_set() = default; handle_set() = default;
......
...@@ -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 doesn'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>
......
...@@ -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(constains) { 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)));
......
...@@ -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(constains) { 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}, {})));
......
...@@ -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 ouptut for the prefix. // us always the same output for the prefix.
struct T {}; struct T {};
namespace { namespace {
......
...@@ -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(object 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(object 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");
......
...@@ -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 finsihed sending"); CAF_MESSAGE("loop over bob and carl until bob finished 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);
......
...@@ -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("unexepected 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("unexepected message type"); // << typeid(Ts).name()); CAF_FAIL("unexpected message type"); // << typeid(Ts).name());
return intrusive::task_result::resume; return intrusive::task_result::resume;
} }
}; };
......
...@@ -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 implementation " << 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 implementation " << 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 implementation " << 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);
......
...@@ -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 System Protocol
/// ///
/// # Protocol Overview /// # Protocol Overview
/// ///
/// The "Binary Actor Sytem Protocol" (BASP) is **not** a network protocol. /// The "Binary Actor System 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 @@
/// ///
/// ![](basp_overview.png) /// ![](basp_overview.png)
/// ///
/// The figure above illustrates the phyiscal as well as the logical view /// The figure above illustrates the physical 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
......
...@@ -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 whether 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;
} }
......
...@@ -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 unreachable 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 occurred.
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);
......
...@@ -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 constructor.
worker(hub_type& hub, message_queue& queue, proxy_registry& proxies); worker(hub_type& hub, message_queue& queue, proxy_registry& proxies);
~worker() override; ~worker() override;
......
...@@ -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 asynchronous IO by managing this singleton instance
middleman_actor manager_; middleman_actor manager_;
}; };
......
...@@ -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 occurred.
void start(acceptor_manager* mgr); void start(acceptor_manager* mgr);
/// Activates the acceptor. /// Activates the acceptor.
......
...@@ -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 endpoint.
/// @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) {
......
...@@ -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 occurred. 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 occurred. 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,
......
...@@ -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 occurred 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);
......
...@@ -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 suppressing 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;
......
...@@ -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(constructors) {
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);
......
...@@ -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 triggered.
size_t run() { size_t run() {
return run_until([] { return false; }); return run_until([] { return false; });
} }
......
...@@ -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` iff 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,
......
...@@ -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 iff 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());
......
...@@ -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))
} }
# Dyanmic time scale that flips to logarithmic if our data is more than two # Dynamic 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", "System")) +
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))
} }
......
...@@ -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] Committing: $packageVersion, $1"
osc commit -m "Automatic commit: $packageVersion, $1" osc commit -m "Automatic commit: $packageVersion, $1"
...@@ -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 entitiy. /// 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment