From c5de77972d8651907ae66baef182429fe9c01427 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Wed, 9 Nov 2011 11:10:36 +0100 Subject: [PATCH] Removing some bad docs --- akka-docs/scala/actors.rst | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/akka-docs/scala/actors.rst b/akka-docs/scala/actors.rst index 37e997e83f..37e85f79bd 100644 --- a/akka-docs/scala/actors.rst +++ b/akka-docs/scala/actors.rst @@ -389,35 +389,17 @@ Reply using the sender ---------------------- If you want to have a handle for replying to a message, you can use -``context.sender``, which gives you an ActorRef. You can reply by sending to -that ActorRef with ``context.sender ! Message``. You can also store the ActorRef +``sender``, which gives you an ActorRef. You can reply by sending to +that ActorRef with ``sender ! Message``. You can also store the ActorRef for replying later, or passing on to other actors. If there is no sender (a -message was sent without an actor or future context) then the context.sender +message was sent without an actor or future context) then the sender defaults to a 'dead-letter' actor ref. .. code-block:: scala case request => val result = process(request) - context.sender ! result // will have dead-letter actor as default - context.sender tryTell result // will return Boolean whether reply succeeded - - -Reply using the reply method ----------------------------- - -If you want to send a message back to the original sender of the message you -just received then you can use the ``context.reply(..)`` method. - -.. code-block:: scala - - case request => - val result = process(request) - context.reply(result) - -In this case the ``result`` will be sent back to the Actor that sent the -``request``. This is equivalent to using ``context.sender ! result``. - + sender ! result // will have dead-letter actor as default Initial receive timeout =======================