Hi all;
For a web worker, should I think of it as a method that is running for the life of the worker (ie a thread in the Java/C# world)? Or is it more a distinct worker thread that handles method calls in the worker's .js file where each call takes over the thread, pausing any other methods in process in that thread, runs to completion, and then on exit, another of the method calls in the worker are woken and runs?
If it's the first, if I can have a method constantly running, in say a while(true) loop, then how do I have it wait & then signal it?
If it's the second, are there any good resources on how best to use a worker thread for a background process that needs to run at times?
We are writing a word processor and the background thread needs to hold the entire document for the life of the editor. And then when the document is edited, re-calculate the layout. So the data must exist in the worker for the life of the editor. And then, when a change occurs, the layout code is kicked into gear.
thanks - dave
Who will win The Windward International Collegiate Programming Championships?