Commit 23efb520 authored by Dominik Charousset's avatar Dominik Charousset

Integrate review feedback

parent e1f57de6
......@@ -167,7 +167,7 @@ statically and dynamically typed event-based actors as well as brokers
+-------------------------------+--------------------------------------------------------------------------+
| **Special-purpose Handlers** | |
+-------------------------------+--------------------------------------------------------------------------+
| ``set_exception_handler(F f)``| Installs ``f`` for converting exceptions to errors (see :ref`error`). |
| ``set_exception_handler(F f)``| Installs ``f`` for converting exceptions to errors (see :ref:`error`). |
+-------------------------------+--------------------------------------------------------------------------+
| ``set_down_handler(F f)`` | Installs ``f`` to handle down messages (see :ref:`down-message`). |
+-------------------------------+--------------------------------------------------------------------------+
......
......@@ -11,7 +11,7 @@ the middleman, implementations should be careful to consume as little time as
possible in message handlers. Brokers should outsource any considerable amount
of work by spawning new actors or maintaining worker actors.
*Note that all UDP-related functionality is still :sup:`experimental`.*
*Note that all UDP-related functionality is still experimental.*
Spawning Brokers
----------------
......
......@@ -120,7 +120,7 @@ adds three options to the ``global`` category.
:language: C++
:lines: 206-218
We create a new ``global`` category in ``custom_options_}``.
We create a new ``global`` category in ``custom_options_``.
Each following call to ``add`` then appends individual options to the
category. The first argument to ``add`` is the associated variable. The
second argument is the name for the parameter, optionally suffixed with a
......@@ -128,13 +128,12 @@ comma-separated single-character short name. The short name is only considered
for CLI parsing and allows users to abbreviate commonly used option names. The
third and final argument to ``add`` is a help text.
The custom ``config`` class allows end users to set the port for the
application to 42 with either ``-p 42`` (short name) or
``--port=42`` (long name). The long option name is prefixed by the
category when using a different category than ``global''. For example, adding
the port option to the category ``foo`` means end users have to type
``--foo.port=42`` when using the long name. Short names are unaffected
by the category, but have to be unique.
The custom ``config`` class allows end users to set the port for the application
to 42 with either ``-p 42`` (short name) or ``--port=42`` (long name). The long
option name is prefixed by the category when using a different category than
``global``. For example, adding the port option to the category ``foo`` means
end users have to type ``--foo.port=42`` when using the long name. Short names
are unaffected by the category, but have to be unique.
Boolean options do not require arguments. The member variable
``server_mode`` is set to ``true`` if the command line contains
......
......@@ -66,7 +66,7 @@ denotes the port, while the second (optional) parameter can be used to
whitelist IP addresses.
After publishing the group at one node (the server), other nodes (the clients)
can get a handle for that group by using the ``remote'' module:
``system.groups().get("remote", "<group>@<host>:<port>")``. This
implementation uses N-times unicast underneath and the group is only available
as long as the hosting server is alive.
can get a handle for that group by using the ``remote`` module:
``system.groups().get("remote", "<group>@<host>:<port>")``. This implementation
uses N-times unicast underneath and the group is only available as long as the
hosting server is alive.
......@@ -169,12 +169,12 @@ Class ``message_builder``
Extracting
----------
The member function ``message::extract`` removes matched elements from
a message. x Messages are filtered by repeatedly applying a message handler to
the greatest remaining slice, whereas slices are generated in the sequence $[0,
size)$, $[0, size-1)$, $...$, $[1, size-1)$, $...$, $[size-1, size)$. Whenever
a slice is matched, it is removed from the message and the next slice starts at
the same index on the reduced message.
The member function ``message::extract`` removes matched elements from a
message. x Messages are filtered by repeatedly applying a message handler to the
greatest remaining slice, whereas slices are generated in the sequence
``[0, size)``, ``[0, size-1)``, ``...``, ``[1, size-1)``, ``...``,
``[size-1, size)``. Whenever a slice is matched, it is removed from the message
and the next slice starts at the same index on the reduced message.
For example:
......
......@@ -13,14 +13,13 @@ Amdahl's law.
Decomposing tasks implies that actors are often short-lived. Assigning a
dedicated thread to each actor would not scale well. Instead, CAF includes a
scheduler that dynamically assigns actors to a pre-dimensioned set of worker
threads. Actors are modeled as lightweight state machines. Whenever a
*waiting* actor receives a message, it changes its state to *ready*
and is scheduled for execution. CAF cannot interrupt running actors because it
is implemented in user space. Consequently, actors that use blocking system
calls such as I/O functions can suspend threads and create an imbalance or lead
to starvation. Such ``uncooperative'' actors can be explicitly detached by the
programmer by using the ``detached`` spawn option, e.g.,
``system.spawn<detached>(my_actor_fun)``.
threads. Actors are modeled as lightweight state machines. Whenever a *waiting*
actor receives a message, it changes its state to *ready* and is scheduled for
execution. CAF cannot interrupt running actors because it is implemented in user
space. Consequently, actors that use blocking system calls such as I/O functions
can suspend threads and create an imbalance or lead to starvation. Such
"uncooperative" actors can be explicitly detached by the programmer by using the
``detached`` spawn option, e.g., ``system.spawn<detached>(my_actor_fun)``.
The performance of actor-based applications depends on the scheduling algorithm
in use and its configuration. Different application scenarios require different
......
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