[e-lang] [Fwd: Re: inter-vat promises]
kpreid at mac.com
Tue May 8 17:59:06 EDT 2007
(MarkM: you might want to forward this if Tony Finch isn't subscribed
and you haven't said this yourself)
> Date: Tue, 8 May 2007 21:10:50 +0100
> From: Tony Finch
> Yes it does, though it makes me wonder what happens to an attempt
> to resolve a promise that is already resolved.
The resolve/1 operation throws; the resolveRace/1 operation returns a
boolean indicating whether it succeeded.
> This usually happens when a turn completes and the only result of
> the turn is to resolve the promise, so the error can't be reported
> to the resolver.
No; for the promises which are implicitly created by eventual sends,
the resolver is held only by, and not revealed by, the internal
eventual-send subsystem, which would have a bug if it tried to reuse
> It also can't be reported to the holder of the promise because
> resolved promises can only be broken by network partition. So is
> the result from the loser of the race just discarded?
Only if the sender of the resolve message ignores the result.
> Also, I'm not entirely sure what the LocalPromise <-> RemotePromise
> transitions in the reference state transition diagram refer to. How
> are remote promises different from a promise with one end passed by
> proxy to another vat?
A remote promise is a promise which forwards its messages to another
vat for pipelining. Remote promises result from passing *promises*
over a comm system; passing a resolver results in a simple far ref to
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang