Removing some bad docs

This commit is contained in:
Viktor Klang 2011-11-09 11:10:36 +01:00
parent 294c71d9cb
commit c5de77972d

View file

@ -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
=======================