MessageFiber.suspend

Suspends the fiber coroutine, makes the resuming start()/resume() call throw e and waits until the fiber is resumed or killed.

  1. Message suspend(Token token, Object identifier, Message msg)
  2. Message suspend(Token token, Exception e)
    class MessageFiber
    suspend
    (,
    Exception e
    )

Parameters

token Token

token expected to be passed to resume()

e Exception

Exception instance to be thrown by the next start()/resume() call.

Return Value

Type: Message

the message passed to the resume() call which made this call resume. Its active member may be exc; for compatibility reasons this method does not throw in this case in contrast to resume().

Throws

KilledException if the fiber is killed.

In: e must not be null and the fiber must be running (not waiting or finished).

Meta