Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#351 Can't far send EProxyResolver implementing whenMoreResolved

open
local elib (53)
5
2007-03-27
2007-03-01
Martin Scheffler
No

#not sure if I do this right though

def makeEProxyResolver := <unsafe:org.erights.e.elib.ref.makeEProxyResolver>

def resolver
def handler {
to handleSendAllOnly(verb, args) { handler.handleSendAll(verb, args) }
to handleOptSealedDispatch(brand) :any { return null}
to handleSendAll(verb, args) :any {
switch ([verb, args]) {
match [=="__whenMoreResolved", [reactor]] {
reactor<-run(resolver.getProxy())
null
}
match _ {
println(`Handler got Verb $verb with Args $args`)
}
}
}
}
bind resolver := makeEProxyResolver(handler, entropy.nextSwiss())
def proxy := resolver.getProxy()

def src := "
def testObj {
to receive(obj) {
#do nothing
}
}
"

def seedVatAuthor := <elang:interp.seedVatAuthor>(<unsafe>).virtualize((introducer))
introducer.onTheAir()
def [obj, vat] := seedVatAuthor(src)
obj <- receive(proxy)

#-------------------- output ----------------------

? rune(["c:\\e\\testproxy.e"])
# value: <Promise>

? === 2007-03-01T15:06:45.968Z (EProxy.sendAllOnly:EProxy.java:192) WRN
causality: ignored from handler:
--vvvv--
null

- static E4E#send(Object, String, Object[])
. <makeE4E>.send(<Far ref>, "run", [<Far ref>])
@ send/3: <c:/e/testproxy.e#:span::11:27::11:29>
- __main$handler#handleSendAll/2: <c:/e/testproxy.e#:span::8:7::8:19>
. <handler>.handleSendAll("__whenMoreResolved", [<Far ref>])
@ handleSendAll/2: <c:/e/testproxy.e#:span::6:47::6:59>
- __main$handler#handleSendAllOnly/2: <c:/e/testproxy.e#:span::6:7::6:23>
. <handler>.handleSendAllOnly("__whenMoreResolved", [<Far ref>])

java.lang.StackOverflowError
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.erights.e.develop.trace.TraceMessageStringifier.toString(TraceMessageStringifier.java:109)
at org.erights.e.develop.trace.TraceLog.acceptBypassingQueue(TraceLog.java:154)
at org.erights.e.develop.trace.TraceLog.accept(TraceLog.java:142)
at org.erights.e.develop.trace.TraceSubsystemMediator.accept(TraceSubsystemMediator.java:148)
(...)

Discussion

    • assigned_to: nobody --> caplet