On Thu, Sep 15, 2011 at 2:44 PM, Marcin Wiśnicki <mwisni...@gmail.com>wrote:

> Is this blocking strictly necessary or would it suffice to simulate it
> with continuation passing ?
>

The problem is the original call site is written as a blocking call, and
ultimately may have originated from Java.  Ie:

void foo() {
  x = bar();
}

native int bar() /*-{
   var x = @Foo::baz()();
   return 2 * x;
}

int baz() {
  return 42;
}

Sure, you might could theoretically rewrite bar to pass a continuation to
baz, but baz is Java code, so you would have to rewrite that as well as
anything it calls, which may include JRE code.  Then that passes the other
way as foo() has to know that bar doesn't return the value directly.

I really don't think this is feasible.

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to