Back: ProcessVariable-accessing Up: Base classes Forward: Promise class-creating instances   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.136 Promise

Defined in namespace Smalltalk
Superclass: ValueHolder
Category: Language-Data types
I store my value in a variable, and know whether I have been initialized or not. If you ask for my value and I have not been initialized, I suspend the process until a value has been assigned.

1.136.1 Promise class: creating instances  (class)
1.136.2 Promise: accessing  (instance)
1.136.3 Promise: initializing  (instance)
1.136.4 Promise: printing  (instance)
1.136.5 Promise: still unclassified  (instance)


1.136.1 Promise class: creating instances

for: aBlock
Invoke aBlock at an indeterminate time in an indeterminate process before answering its value from #value sent to my result.

null
This method should not be called for instances of this class.


1.136.2 Promise: accessing

hasError
Answer whether calling #value will raise an exception.

hasValue
Answer whether we already have a value (or calling #value will raise an error).

value
Get the value of the receiver.

value: anObject
Set the value of the receiver.


1.136.3 Promise: initializing

initialize
Private - set the initial state of the receiver


1.136.4 Promise: printing

printOn: aStream
Print a representation of the receiver


1.136.5 Promise: still unclassified

errorValue: anException
Private - Raise anException whenever #value is called.



Back: Promise-printing Up: Promise Forward: Random   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on August, 19 2010 using texi2html