[e-lang] EProxyResolver and sameness-breaking

Kevin Reid kpreid at mac.com
Wed Mar 7 12:38:02 CST 2007


On Mar 7, 2007, at 12:23, Mark Miller wrote:
> On 3/7/07, Kevin Reid <kpreid at mac.com> wrote:
>> In the case of remote promises, a comm system must use a hash table
>> to store the promise-and-handler pairs. This is an additional cost
>> over the current system, and I haven't yet thought of a fix.
>>
>> What do you think of this idea?
>
> The problem you're fixing has bugged me for a long time, but I did not
> expect a practical solution. I haven't been in the relevant code for a
> long time, so my memory may be somewhat stale. AFAICT from my old
> stale memories, your proposal should be both correct and practical.
> The extra cost you mention above should not be a problem. I like it.

Another question. EProxyResolver has the following methods:

? help(<unsafe:org.erights.e.elib.ref.makeEProxyResolver>(def p {},  
null))
# value: an org.erights.e.elib.ref.EProxyResolver
#        interface "org.erights.e.elib.ref.EProxyResolver" {
#            to getOptIdentity() :any
#            to getProxy() :nullOk[Ref]
#            to gettingCloser() :void
#            to isDone() :Boolean
#            to optHandler() :nullOk[EProxyHandler]
#            to reactToGC() :void
#            to resolve(_) :void
#            to resolve(_, :Boolean) :Boolean
#            to resolveRace(_) :Boolean
#            to smash(:nullOk[Throwable]) :Boolean
#        }
#

Of these, the following would naturally go away given my proposal:

#            to resolve(_) :void
#            to resolve(_, :Boolean) :Boolean
#            to resolveRace(_) :Boolean
#            to smash(:nullOk[Throwable]) :Boolean

Of the remaining methods,

#            to getOptIdentity() :any
#            to getProxy() :nullOk[Ref]
#            to gettingCloser() :void
#            to isDone() :Boolean
#            to optHandler() :nullOk[EProxyHandler]
#            to reactToGC() :void

what are these used for by the E-level clients of an EProxyResolver,  
and could they be eliminated?

In particular, could we entirely eliminate the EProxyResolver object  
(other than possibly being an implementation detail), and have  
instead makeProxy(handler, resolution) which directly returns a proxy?

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list