From Erights

(Difference between revisions)
Jump to: navigation, search
(document gettingCloser)
(rename Ref (object) for capitalization unambiguity)
(7 intermediate revisions not shown)
Line 15: Line 15:
{{instance msgdoc|smash|1|<var>problem</var>|[[Boolean]]}}
{{instance msgdoc|smash|1|<var>problem</var>|[[Boolean]]}}
Equivalent to resolveRace([[Ref (object)#broken/1|Ref.broken]](<var>problem</var>)).
Equivalent to resolveRace([[Object Ref#broken/1|Ref.broken]](<var>problem</var>)).
{{instance msgdoc|resolve|2|<var>resolution</var>, <var>strict</var> :[[Boolean]]|[[Boolean]]}}
{{instance msgdoc|resolve|2|<var>resolution</var>, <var>strict</var> :[[Boolean]]|[[Boolean]]}}

Latest revision as of 00:26, 14 January 2009

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.




Signature: resolve(resolution) :void

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


Signature: resolveRace(_) :Boolean

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


Signature: smash(problem) :Boolean

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


Signature: resolve(resolution, strict :Boolean) :Boolean

(Deprecated as of 2007-05-30: User:Markm, User:Kevin Reid, and Dean Tribble agree this interface is inferior to resolve/1 and resolveRace/1.)

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.


Signature: isDone() :Boolean

Returns whether the promise is already resolved.


Signature: gettingCloser() :void

Has no visible effect; used by causality tracing. Claims that something happened such that this resolver is closer to getting resolved.

Personal tools
more tools