[cap-talk] Last Call for ref_send API 1.0

Tyler Close tyler.close at gmail.com
Tue Apr 10 11:34:37 CDT 2007


On 4/10/07, Kevin Reid <kpreid at mac.com> wrote:
> On Apr 9, 2007, at 17:12, Tyler Close wrote:
> > On 4/4/07, Kevin Reid <kpreid at mac.com> wrote:
> >> Question: The documentation does not state explicitly that a resolved
> >> Promise will (allegedly) from then on return the same value from
> >> every call to cast(). Is this the case?
> >
> > A promise created by the defer() method can only be resolved once and
> > stays in that resolved state forever.
>
> I think you're agreeing with me, but this phrasing doesn't really
> make it clear. I infer that by "that resolved state" you mean a state
> of being resolved /to a particular reference/ (that is, that being
> resolved to some other reference would be "a different resolved
> state"), but I wouldn't think that except for the context of my
> question above. I request that this be stated more clearly.

Is the following javadoc clear on this point:

    /**
     * Creates a promise in the deferred state.
     * <p>
     * The return from this method is a ( {@link Promise promise},
     * {@link Resolver resolver} ) pair. The promise is initially in the
     * deferred state and can only be resolved by the resolver once. If the
     * promise is {@link Resolver#resolve resolved} to a referent, the promise
     * will forever refer to that referent. If the promise, is
     * {@link Resolver#reject rejected} with a specified reason, the promise
     * will forever be in the rejected state, with that reason. After this
     * initial state transition, all subsequent invocations of either
     * {@link Resolver#resolve resolve} or {@link Resolver#reject reject} are
     * silently ignored. Any {@link Do observer} {@link #when registered} on
     * the promise will only be notified after the promise is either resolved
     * or rejected.
     * </p>
     * @param <T> referent type
     * @return ( {@link Promise promise}, {@link Resolver resolver} )
     */
    public <T> Channel<T>
    defer() {

Tyler

-- 
The web-calculus is the union of REST and capability-based security:
http://www.waterken.com/dev/Web/

Name your trusted sites to distinguish them from phishing sites.
https://addons.mozilla.org/firefox/957/


More information about the cap-talk mailing list