A main thread for pushing from the backbuffer to the front. (canvas, webgl, etc)

The list can go on and on, not that it should. If a function is simple, quick, and not constantly running, chances are it shouldn't have it's own thread. The benefit of running multiple threads is the holy grail of games: consistent frames per second under variable load. That right there is a hallmark of great game designers. So many times I'll pop in a game that is professionally made for a closed source single system (ps3, xbox) with very known hardware specs and at points in the game they're will be a frame per second drop (offline). This could be debated and I'm sure it is other places.

And here is a little FPS loop (javascript):

var fps = 0, now, lastUpdate = (new Date)*1 - 1;

// The higher this value, the less the FPS will be affected by quick changes
// Setting this to 1 will show you the FPS of the last sampled frame only
var fpsFilter = 50;

I'm sure somewhere someone has come up with a hard fast rule about what a good fps is. I just like to think that anything above noticeably inconsistent and slow. My goal is almost always 30+ FPS for the composited flip, less than that and people will notice, less than 24 and people will really notice.

What are Web Workers

Web Workers are basically a API specification that lets you create background JavaScript threads to process CPU intensive tasks. Normally in browsers a single thread is created to handle all the JavaScript code. So whatever JavaScript code is run in the browser is executed in that single thread; whether you are doing some calculation or updating page elements. The downside of this is that some CPU intensive piece of JavaScript can render the page unresponsive or slow it to a crawl.

Web Workers alleviate this problem by letting you create multiple JavaScript threads that will run independent of each other, this will prevent one CPU intensive piece of JavaScript from interfering with the UI code.

And there you have it. This post is just an introduction. The eventual goal being an explanation of how to apply webworkers to just about everything. But first I have to figure that out. ha.