javascript web workers tutorial ( introduction to multithreading in js )




Simple intro to web workers in javaScript ( a way to do multithreading in javascript)

_ WHat is web worker
– web worker concept
– Sending message to the worker using postMessage
– Receiving message from worker using onMessage

javascript webworkers , Web workers , web worker, advance javascript tutorial , web workers html5 , web worker tutorial , js, javascript patterns , javascript multithreading, multithreading in javascript , javascript web workers example , ecma6, ecma 2015



Original source


23 responses to “javascript web workers tutorial ( introduction to multithreading in js )”

  1. Thanks for the great tut. Firefox and W3 were giving me a headache!
    I have one question.
    In the process of delegating workers, won't that result in a slower script because we're basically increasing the lexical scope of the window object? Similar to nesting try catch statements to create dynamic scope, it helps the JS engine but not the web app.

  2. Hi, as you said that ajax call is on same thread, I think that is not completely true because setTimeout and Setinterval and xmlhttprequest is handled by browser in another thread and that thread push the callback function to callback queue. kindly please correct me if I m wrong. once again thanks for video 😉

  3. Thank you for a great video. Unfortuanely in my case worker.js with 'this' is not working, I checked in Firefox and Chrome. Removing 'this' fixed the problem. Do you know why? 'this' – context is undefined in worker.js

Leave a Reply