a simple. var thread = new Thread(function(){ return "hello Thread.js"; }); thread.once().done(function(d){ console.log(d); // -> hello Thread.js }); with arguments. var thread = new Thread(function(a, b){ return a + b; }); thread.once(1, 2).done(function(d){ console.log(d); // -> 3 }); with progress. var thread = new Thread(function(){ notify("progress"); return "hello Thread.js"; }); thread.once