The event loop postman! Source: http://developer.yahoo.com/blogs/ydn/posts/2010/10/understanding- the-event-loops-and-writing-great-code-for-node-js-part-1/
Web Worker› Definition - “An API that allows Web application authors to spawn background workers running scripts in parallel to their main page. This allows for thread-like operation with message-passing as the coordination mechanism"
Stopping a worker› 2 ways to stop a worker › Worker.terminate() in parent page › close() in worker› Once the worker is stopped, it has to be re-initialized
Error Handling› worker.addEventListener("error", callback) › filename, lineno, message properties are available for debugging
Worker use cases› Prefetching data› Background polling› Parsing big xml/json› Image processing› Any CPU intensive tasks
Browser Support Source: http://caniuse.com/webworkers
Questions?› Slides will be posted to SlideShare We will send out the link later› You can email me at: firstname.lastname@example.org