Resolver
From Erights
Kevin Reid (Talk | contribs) (use new message doc template) |
Kevin Reid (Talk | contribs) (document gettingCloser) |
||
Line 29: | Line 29: | ||
{{instance msgdoc|gettingCloser|0||[[void]]}} | {{instance msgdoc|gettingCloser|0||[[void]]}} | ||
- | + | Has no visible effect; used by [[Causeway|causality tracing]]. Claims that something happened such that this resolver is closer to getting resolved. | |
[[Category:ELib specification]] | [[Category:ELib specification]] | ||
[[Category:Protocols]] | [[Category:Protocols]] |
Revision as of 23:21, 1 August 2008
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
- Signature: resolve(resolution) :void
Resolves the promise to resolution, or throws if it is already resolved.
resolveRace/1
- Signature: resolveRace(_) :Boolean
Resolves the promise to resolution and returns true, or returns false if it is already resolved.
smash/1
- Signature: smash(problem) :Boolean
Equivalent to resolveRace(Ref.broken(problem)).
resolve/2
(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.
isDone/0
- Signature: isDone() :Boolean
Returns whether the promise is already resolved.
gettingCloser/0
- Signature: gettingCloser() :void
Has no visible effect; used by causality tracing. Claims that something happened such that this resolver is closer to getting resolved.