HNHacker News
TopNewBestAskShowJobs

javapoly

13 karma · joined May 8, 2016

submissionscomments
javapoly··on Java Polyfill for the Browser
Yes, you can!
javapoly··on Java Polyfill for the Browser
You can use simulated threads with JavaPoly, which allows you to utilize the full Java threading model (including locks). If you enable the native jvm, you get true threads. The reason you wouldn't want to use WebWorkers as a primitive for building threads is that the javascript memory model doesn't allow for shared memory, so you would take a huge performance hit while crossing the serialization boundary for virtually every memory access. You'd be better off just using the simulated threads at that point.
javapoly··on Java Polyfill for the Browser
JavaPoly uses Doppio. As a result, you can run both Rhino and Nashorn in JavaPoly too!