Please note This is a contrived example.
function longFunc(){ var deferred = $.Deferred(); setTimeout(function(){ console.log(\"
Just chain another then call, since shortAfterLongFunc returns new promise you can further work with it:
then
shortAfterLongFunc
longFunc().then(shortAfterLongFunc).then(function(data) { console.log('all is complted', data); });