I had heard of the term 'Continuation' before, but had only glanced at it and never thought about how it could apply to JavaScript. Fortunately, someone else did the thinking for me. The low-down is that the Continuation Pattern can be used when executing really slow JavaScript algorithms that lock up the browser. By doing a Continuation, you can 'chunk' Function algorithms into smaller processes and free up the browser so that the user isn't stuck waiting 5 seconds for your complex JavaScript algorithm to finish. For a detailed explanation check out Marijn Haverbeke article:
Continuations in JavaScript
by Matt Snider · August 9, 2007 @ 11:08 am
