This is a good approach for the times you can't use web workers. It's not just old browsers either. You can't draw to the canvas with a web worker.
Depending on what you're doing, you may want to yield after x operations rather than on every recursive invocation like the example shown. There is a performance cost to using setImmediate.