DOC: Updated stop description
This commit is contained in:
parent
6bbbceaf6c
commit
ab1c4c6833
2 changed files with 8 additions and 6 deletions
|
|
@ -340,13 +340,14 @@ message.
|
||||||
Stopping actors
|
Stopping actors
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Actors are stopped by invoking the ``stop`` method of the ``ActorRef``.
|
Actors are stopped by invoking the ``stop`` method of the ``ActorContext``
|
||||||
The actual termination of the actor is performed asynchronously, i.e.
|
for child actors or ``stop`` method of the ``ActorSystem`` for top level
|
||||||
|
actors. The actual termination of the actor is performed asynchronously, i.e.
|
||||||
``stop`` may return before the actor is stopped.
|
``stop`` may return before the actor is stopped.
|
||||||
|
|
||||||
.. code-block:: java
|
.. code-block:: java
|
||||||
|
|
||||||
actor.stop();
|
getContext().stop(childActorRef);
|
||||||
|
|
||||||
Processing of the current message, if any, will continue before the actor is stopped,
|
Processing of the current message, if any, will continue before the actor is stopped,
|
||||||
but additional messages in the mailbox will not be processed. By default these
|
but additional messages in the mailbox will not be processed. By default these
|
||||||
|
|
|
||||||
|
|
@ -407,13 +407,14 @@ object.
|
||||||
Stopping actors
|
Stopping actors
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Actors are stopped by invoking the ``stop`` method of the ``ActorRef``.
|
Actors are stopped by invoking the ``stop`` method of the ``ActorContext``
|
||||||
The actual termination of the actor is performed asynchronously, i.e.
|
for child actors or ``stop`` method of the ``ActorSystem`` for top level
|
||||||
|
actors. The actual termination of the actor is performed asynchronously, i.e.
|
||||||
``stop`` may return before the actor is stopped.
|
``stop`` may return before the actor is stopped.
|
||||||
|
|
||||||
.. code-block:: scala
|
.. code-block:: scala
|
||||||
|
|
||||||
actor.stop()
|
context.stop(childActorRef)
|
||||||
|
|
||||||
Processing of the current message, if any, will continue before the actor is stopped,
|
Processing of the current message, if any, will continue before the actor is stopped,
|
||||||
but additional messages in the mailbox will not be processed. By default these
|
but additional messages in the mailbox will not be processed. By default these
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue