Object Ref

From Erights

Revision as of 14:56, 2 July 2009 by Kevin Reid (Talk | contribs)
Jump to: navigation, search

Ref is an object available in the universal environment which provides the basic operations on refs other than call and send.

? Ref
# value: Ref



XXX completely specify and test behavior


Signature: resolution(ref :any) :any

Observably, this operation returns ref or something indistinguishable from it. If applicable in the implementation, if ref is a forwarder such as a resolved promise, it will return the referent, and any other such applicable optimizations.


Signature: fulfillment(ref :any) :any

Requires that ref is fulfilled.

If ref is

  • fulfilled (resolved and not broken), then Ref.fulfillment(ref) returns Ref.resolution(ref).
  • a promise (unresolved), then Ref.fulfillment(ref) throws indicating this. XXX Specify exception type?
  • broken, then Ref.fulfillment(ref) throws its problem.


Signature: promise() :Tuple[Promise, LocalResolver]

The specification for this message has not been written.


Signature: broken(problem :Exception) :broken

The specification for this message has not been written.

# Regression test
? Ref.broken(null)
# problem: <NullPointerException: Missing problem>
This page is a stub; it should be expanded with more information. If doing so, check the original E web site and the mailing list archives for content which could be moved into this page.
Personal tools
more tools