Category: Language-Implementation
Superclass: Object
At my heart, I am something like the goto instruction; my creation sets the label, and my methods do the jump. However, this is a really powerful kind of goto instruction. If your hair is turning green at this point, don't worry as you will probably only deal with users of continuations, rather than with the concept itself.

Method category index

instance creation (class)
invocation (instance)

instance creation (class)

current
Return a continuation.

currentDo: aBlock

Pass a continuation to the one-argument block, aBlock and return the result of evaluating it.

escapeDo: aBlock

Pass a continuation to the one-argument block, knowing that aBlock does not fall off (either because it includes a method return, or because it yields control to another continuation). If it does, an exception will be signalled and the current process terminated.

top


invocation (instance)

callCC
Activate the original continuation, passing back in turn a continuation for the caller. The called continuation becomes unusable, and any attempt to reactivate it will cause an exception. This is not a limitation, in general, because this method is used to replace a continuation with another (see the implementation of the Generator class).

oneShotValue

Return nil to the original continuation, which becomes unusable. Attempting to reactivate it will cause an exception. This is an optimization over #value.

oneShotValue: v

Return anObject to the original continuation, which becomes unusable. Attempting to reactivate it will cause an exception. This is an optimization over #value:.

value

Return nil to the original continuation, copying the stack to allow another activation.

value: anObject

Return anObject to the original continuation, copying the stack to allow another activation.

valueWithArguments: aCollection

Return the sole element of aCollection to the original continuation (or nil if aCollection is empty), copying the stack to allow another activation

top