From ab1c4c683340463fb36ed336d740574c93e656d6 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 14 Dec 2011 19:39:51 +0100 Subject: [PATCH] DOC: Updated stop description --- akka-docs/java/untyped-actors.rst | 7 ++++--- akka-docs/scala/actors.rst | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/akka-docs/java/untyped-actors.rst b/akka-docs/java/untyped-actors.rst index c680865b6b..1b32481901 100644 --- a/akka-docs/java/untyped-actors.rst +++ b/akka-docs/java/untyped-actors.rst @@ -340,13 +340,14 @@ message. Stopping actors =============== -Actors are stopped by invoking the ``stop`` method of the ``ActorRef``. -The actual termination of the actor is performed asynchronously, i.e. +Actors are stopped by invoking the ``stop`` method of the ``ActorContext`` +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. .. code-block:: java - actor.stop(); + getContext().stop(childActorRef); 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 diff --git a/akka-docs/scala/actors.rst b/akka-docs/scala/actors.rst index 39f4647b90..663c07c70a 100644 --- a/akka-docs/scala/actors.rst +++ b/akka-docs/scala/actors.rst @@ -407,13 +407,14 @@ object. Stopping actors =============== -Actors are stopped by invoking the ``stop`` method of the ``ActorRef``. -The actual termination of the actor is performed asynchronously, i.e. +Actors are stopped by invoking the ``stop`` method of the ``ActorContext`` +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. .. code-block:: scala - actor.stop() + context.stop(childActorRef) 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