REPLY

>>-REPLY--+------------+--;------------------------------------><
          +-expression-+

REPLY sends an early reply from a method to its caller. The method issuing REPLY returns control, and possibly a result, to its caller to the point from which the message was sent; meanwhile, the method issuing REPLY continues running.

If you specify expression, it is evaluated and the object resulting from the evaluation is passed back. If you omit expression, no object is passed back.

Unlike RETURN or EXIT, the method issuing REPLY continues to run after the REPLY until it issues an EXIT or RETURN instruction. The EXIT or RETURN must not specify a result expression.

Example:

reply 42           /* Returns control and a result    */
call tidyup        /* Can run in parallel with sender */
return

Notes:

  1. You can use REPLY only in a method.

  2. A method can execute only one REPLY instruction.

  3. When the method issuing the REPLY instruction is the only method on the current activity with exclusive access to the object's variable pool, the method retains exclusive access on the new activity. When the other methods on the activity also have access, the method issuing REPLY releases its access and reacquires the access on the new activity. This might force the method to wait until the original activity has released its access.

See Concurrency for a complete description of concurrency.