Resolver

From Erights

(Difference between revisions)
Jump to: navigation, search
m ("undocumented method" -> "unspecified message")
Line 33: Line 33:
gettingCloser() :void
gettingCloser() :void
-
{{undocumented method}}
+
{{unspecified message}}

Revision as of 15:20, 21 April 2007

A resolver is an object providing the ability to resolve a promise.

A resolver does not allow retrieving the reference to which a promise has been resolved; in E (but not in ref_send), a resolver allows observing whether resolution has occurred.

Contents

Protocol

resolve/1

resolve(resolution) :void

Resolves the promise to resolution, or throws if it is already resolved.

resolve/2

resolve(resolution, strict :Boolean) :Boolean

Resolves the promise to resolution and returns true, or if it is already resolved, returns false if strict is false or throws if it is true.

resolveRace/1

resolveRace(_) :Boolean

Resolves the promise to resolution and returns true, or returns false if it is already resolved.

smash/1

smash(problem) :Boolean

Equivalent to resolveRace(Ref.broken(problem)).

isDone/0

isDone() :Boolean

Returns whether the promise is already resolved.

gettingCloser/0

gettingCloser() :void

The specification for this message has not been written.

Personal tools
more tools