Commit 8c7849c6 authored by Dominik Charousset's avatar Dominik Charousset

Fix typos

parent 5b3704c6
......@@ -12,7 +12,7 @@ caf {
# # Maximum number of threads for the scheduler. No hardcoded default.
# max-threads = ... (detected at runtime)
}
# Prameters for the work stealing scheduler. Only takes effect if
# Parameters for the work stealing scheduler. Only takes effect if
# caf.scheduler.policy is set to "stealing".
work-stealing {
# Number of zero-sleep-interval polling attempts.
......
......@@ -61,7 +61,7 @@ using global_meta_objects_guard_type = intrusive_ptr<ref_counted>;
CAF_CORE_EXPORT global_meta_objects_guard_type global_meta_objects_guard();
/// Returns the global storage for all meta objects. The ::type_id of an object
/// is the index for accessing the corresonding meta object.
/// is the index for accessing the corresponding meta object.
CAF_CORE_EXPORT span<const meta_object> global_meta_objects();
/// Returns the global meta object for given type ID.
......
......@@ -19,7 +19,7 @@ namespace caf {
/// manager owns the `outbound_path` objects, has a buffer for storing pending
/// output and is responsible for the dispatching policy (broadcasting, for
/// example). The default implementation terminates the stream and never
/// accepts any pahts.
/// accepts any paths.
class CAF_CORE_EXPORT downstream_manager {
public:
// -- member types -----------------------------------------------------------
......
......@@ -17,7 +17,7 @@
namespace caf {
/// The default downstream manager base stores outbound paths in an unordered
/// map. It always takes ownership of the pahts by using unique pointers.
/// map. It always takes ownership of the paths by using unique pointers.
class CAF_CORE_EXPORT downstream_manager_base : public downstream_manager {
public:
// -- member types -----------------------------------------------------------
......
......@@ -35,7 +35,7 @@ enum class exit_reason : uint8_t {
user_shutdown,
/// Indicates that an actor was killed unconditionally.
kill,
/// Indicates that an actor finishied execution because a connection
/// Indicates that an actor finished execution because a connection
/// to a remote link was closed unexpectedly.
remote_link_unreachable,
/// Indicates that an actor was killed because it became unreachable.
......
......@@ -25,8 +25,8 @@ struct extend_helper<D, B, M, Ms...> : extend_helper<D, M<B, D>, Ms...> {
} // namespace detail
/// Allows convenient definition of types using mixins.
/// For example, `extend<ar, T>::with<ob, fo>` is an alias for
/// `fo<ob<ar, T>, T>`.
/// For example, `extend<one, T>::with<two, three>` is an alias for
/// `three<two<one, T>, T>`.
///
/// Mixins always have two template parameters: base type and
/// derived type. This allows mixins to make use of the curiously recurring
......
......@@ -51,7 +51,7 @@ protected:
// Prepare workers vector.
auto num = num_workers();
workers_.reserve(num);
// Create worker instanes.
// Create worker instances.
for (size_t i = 0; i < num; ++i)
workers_.emplace_back(
std::make_unique<worker_type>(i, this, init, max_throughput_));
......
......@@ -28,7 +28,7 @@ public:
// -- member types -----------------------------------------------------------
/// Forces the compiler to use the type `span<const T>` instead of trying to
/// match paremeters to a `span`.
/// match parameters to a `span`.
template <class T>
struct span_type {
using type = span<const T>;
......
......@@ -120,7 +120,7 @@ public:
/// Stores whether all types are nothrow assignable *and* constructible. We
/// need to check both, since assigning to a variant results in a
/// move-contruct unless the before and after types are the same.
/// move-construct unless the before and after types are the same.
static constexpr bool nothrow_move_assign =
nothrow_move_construct
&& detail::conjunction<
......
......@@ -34,8 +34,8 @@ void default_attachable::actor_exited(const error& rsn, execution_unit* host) {
bool default_attachable::matches(const token& what) {
if (what.subtype != attachable::token::observer)
return false;
auto& ot = *reinterpret_cast<const observe_token*>(what.ptr);
return ot.observer == observer_ && ot.type == type_;
auto& ref = *reinterpret_cast<const observe_token*>(what.ptr);
return ref.observer == observer_ && ref.type == type_;
}
default_attachable::default_attachable(actor_addr observed, actor_addr observer,
......
......@@ -41,8 +41,8 @@ void stream_aborter::actor_exited(const error& rsn, execution_unit* host) {
bool stream_aborter::matches(const attachable::token& what) {
if (what.subtype != attachable::token::stream_aborter)
return false;
auto& ot = *reinterpret_cast<const token*>(what.ptr);
return ot.observer == observer_ && ot.slot == slot_;
auto& ref = *reinterpret_cast<const token*>(what.ptr);
return ref.observer == observer_ && ref.slot == slot_;
}
stream_aborter::stream_aborter(actor_addr&& observed, actor_addr&& observer,
......
......@@ -359,7 +359,7 @@ CAF_TEST(depth_2_pipeline_error_at_source) {
CAF_CHECK_EQUAL(deref<sum_up_actor>(snk).state.fin_called, 1);
}
CAF_TEST(depth_2_pipelin_error_at_sink) {
CAF_TEST(depth_2_pipeline_error_at_sink) {
CAF_MESSAGE("streams must abort if a sink fails at runtime");
auto src = sys.spawn(file_reader, 500u);
auto snk = sys.spawn(sum_up);
......
......@@ -41,7 +41,7 @@ buf make_log(level lvl) {
buf result{{level::trace, "trace1"},
{level::trace, "trace2"},
{level::debug, "debug1"},
{level::error, "errro1"},
{level::error, "error1"},
{level::trace, "trace3"}};
auto predicate = [=](const value_type& x) { return !select::apply(lvl, x); };
auto e = result.end();
......
......@@ -65,7 +65,7 @@ CAF_TEST(joining) {
CAF_TEST(starts with) {
CAF_CHECK(starts_with("foobar", "f"));
CAF_CHECK(starts_with("foobar", "fo"));
CAF_CHECK(starts_with("foobar", "foo"));
CAF_CHECK(starts_with("foobar", "fooba"));
CAF_CHECK(starts_with("foobar", "foobar"));
CAF_CHECK(!starts_with("foobar", "o"));
......
......@@ -83,7 +83,7 @@ protected:
return false;
// tell broker it entered passive mode, this can result in
// producing, why we check the condition again afterwards
using passiv_t = typename std::conditional<
using passive_t = typename std::conditional<
std::is_same<handle_type, connection_handle>::value,
connection_passivated_msg,
typename std::conditional<
......@@ -92,7 +92,7 @@ protected:
datagram_servant_passivated_msg>::type>::type;
mailbox_element tmp{strong_actor_ptr{}, make_message_id(),
mailbox_element::forwarding_stack{},
make_message(passiv_t{hdl()})};
make_message(passive_t{hdl()})};
invoke_mailbox_element_impl(ctx, tmp);
return activity_tokens_ != size_t{0};
}
......
......@@ -30,7 +30,7 @@ public:
/// Called by the underlying I/O device to indicate that a new remote
/// endpoint has been detected, passing in the received datagram.
/// @returns `true` if the manager accepts further enpoints,
/// @returns `true` if the manager accepts further endpoints,
/// otherwise `false`.
virtual bool new_endpoint(receive_buffer& buf) = 0;
......
......@@ -82,7 +82,7 @@ public:
void intrusive_ptr_release_impl() override;
};
/// Makes sure the multipler does not exit its event loop until
/// Makes sure the multiplier does not exit its event loop until
/// the destructor of `supervisor` has been called.
class CAF_IO_EXPORT supervisor {
public:
......
......@@ -182,7 +182,7 @@ public:
void push_back(value_type value);
private:
// Increse the buffer capacity, maintaining its data. May invalidate
// Increase the buffer capacity, maintaining its data. May invalidate
// iterators.
void increase_by(size_t bytes);
......
......@@ -589,7 +589,7 @@ bool default_multiplexer::poll_once(bool block) {
for (auto& ptr : xs)
resume(std::move(ptr));
handle_internal_events();
// Try to swap back to internall_posted_ to re-use allocated memory.
// Try to swap back to internally_posted_ to re-use allocated memory.
if (internally_posted_.empty()) {
xs.swap(internally_posted_);
internally_posted_.clear();
......
......@@ -47,7 +47,7 @@ function would resemble the following (pseudo) code:
.. code-block:: C++
int main(int argc, char** argv) {
// Initialze the global type information before anything else.
// Initialize the global type information before anything else.
init_global_meta_objects<...>();
core::init_global_meta_objects();
// Create the config.
......@@ -263,7 +263,7 @@ following POD type ``foo``.
By assigning type IDs and providing ``inspect`` overloads, we provide static and
compile-time information for all our types. However, CAF also needs some
information at run-time for deserializing received data. The function
``init_global_meta_objects`` takes care fo registering all the state we need at
``init_global_meta_objects`` takes care of registering all the state we need at
run-time. This function usually gets called by ``CAF_MAIN`` automatically. When
not using this macro, users **must** call ``init_global_meta_objects`` before
any other CAF function.
......
......@@ -5,7 +5,7 @@ Errors
Errors in CAF have a code and a category, similar to ``std::error_code`` and
``std::error_condition``. Unlike its counterparts from the C++ standard library,
``error`` is plattform-neutral and serializable.
``error`` is platform-neutral and serializable.
Class Interface
---------------
......
......@@ -252,7 +252,7 @@ counters instead.
Gauges are owned (and created) by a gauge family object. We can either get the
family object explicitly by calling ``gauge_family``, or we can use one of the
two shortcut functions ``gauge_intance`` or ``gauge_singleton``. The C++
two shortcut functions ``gauge_instance`` or ``gauge_singleton``. The C++
prototypes for the registry member functions look as follows:
.. code-block:: C++
......
......@@ -875,10 +875,10 @@ void caf_main(actor_system& sys, const config& cfg) {
out << endl;
std::mutex out_mtx;
auto grp = sys.groups().anonymous();
for (auto& fpr : intermediate_results) {
for (auto& res : intermediate_results) {
sys.spawn_in_group(grp, [&](blocking_actor* self) {
second_pass(self, grp, entities, fpr.res.this_node, entity_names,
*fpr.fstream, out, out_mtx, !cfg.include_hidden_actors, vl);
second_pass(self, grp, entities, res.res.this_node, entity_names,
*res.fstream, out, out_mtx, !cfg.include_hidden_actors, vl);
});
}
sys.await_all_actors_done();
......
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