Web Worker with GWT

What is the easiest way to get the Web-Worker stream loaded by the GWT module?

I do not mean getting support for Web-Worker in GWT (there are libraries for this), but rather, how to create a GWT module for loading into a web worker?

I suspect that I need a special Linker - is there any one available?

+7
source share
3 answers

Take a look at http://code.google.com/p/speedtracer/source/browse/trunk/src/client/ui/src/com/google/gwt/webworker/ I didn’t dig deep, but it looks like this is the “special the linker "you are looking for (the linker is then used for the" tune engines "and" broken "SpeedTracer modules)

+7
source

There is a library called gwt-ns that includes a web artist. The following link is a usage example. http://extremelysatisfactorytotalitarianism.com/blog/?p=645

UPDATE The author of gwt-ns published a note saying that he stopped development since 2010, so it is incompatible with the latest GWT (for example, 2.6.1 or later)

NOTE (February 04, 2014): gwt-ns has not been affected since June 2010 and I understand that web worker support does not work in any recent versions of GWT. This was somewhat expected, since we got far enough to the GWT compiler to work and to make changes as the compiler design changes. Other modules are also likely to be deprecated, since the choice of permutations for these functions should be adjusted as support browsers are added or the support moves from prefix to full. Some things may still randomly work. Feel free to use the code as you please, but be warned. I’m no longer developing GWT, so if you want workers to work again with gwt-ns as a base, you need to unlock the code and start a new project (fortunately, the Apache 2.0 license makes this easy for you).

+4
source

You can try the gwtwwlinker project published on GitHub: https://github.com/tomekziel/gwtwwlinker

This allows you to compile a separate module as a web worker, a dedicated linker eliminates the usual $wnd and $doc dependencies.

+2
source

All Articles