function taskCompleted(res) {
            that.state = "COMPLETED";
            that.result = res != null ? res : null;
            return res;
        }
// resolve/reject run on next tick so 'action' functions that return immediately don't cause TaskSet.getPromises() to return bad results
resolve/reject run on next tick so 'action' functions that return immediately don't cause TaskSet.getPromises() to return bad results
resolve / reject run on next tick so ' action ' functions that return immediately don ' t cause TaskSet . getPromises () to return bad results
function taskCompleted(res) {
            that.state = "COMPLETED";
            that.result = res != null ? res : null;
            return res;
        }
function taskCompleted ( res ) { that . state = "COMPLETED" ; that . result = res != null ? res : null ; return res ; }
resolve/reject run on next tick so 'action' functions that return immediately don't cause TaskSet.getPromises() to return bad results
resolve / reject run on next tick so ' action ' functions that return immediately don ' t cause TaskSet . getPromises () to return bad results