3 ms·
What do you think is needed beyond something like asm.js? For me the limitation that stands out is Javascript cannot pre-empt. while(true){}; locks things un
by Lerc 13y ago
What do you think is needed beyond something like asm.js?
For me the limitation that stands out is Javascript cannot pre-empt.
while(true){};
locks things until some magical supervisor (which _can_ pre-empt) notices and Tells you something went wrong.
You can use workers for long operations but you can't communicate with them while they do it.
look at the example for Web Workers
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#a-background-number-crunching-worker http://www.whatwg.org/specs/web-apps/current-work/multipage/...
It pumps out a series of primes, but you can't tell it to stop or switch to Fibonacci without killing it and making a brand new one.