Hello all,
I have a JS script that generates a continuation (by calling a Java function that throws Context.getCurrentContext().captureContinuation()). I then serialize the continuation using ScriptableOutputStream. This works well, as all connected Java objects are serializable.
In some situations, when I de-serialize the stream, I get the error: "Can't find top level scope for ClassCache.get"
This will throw an error:
A = bp.Event("A");
B = bp.Event("B");
C = bp.Event("C");
var r;
bp.registerBThread(function() {
r=bsync({ waitFor : A }); // The problem is with this assignment.
bsync({ waitFor : B });
bsync({ waitFor : C });
});
while this won't (the assignment to r is removed):
/* global bp */
A = bp.Event("A");
B = bp.Event("B");
C = bp.Event("C");
var r;
bp.registerBThread(function() {
bsync({ waitFor : A }); // The problem is with this assignment.
bsync({ waitFor : B });
bsync({ waitFor : C });
});
Any ideas?
Thanks!