Lets say I want to process some tasks in the synchronous manner, so I have this function:
function executePromiseQueueSync(queue){ var seed = $.Deferred(),
You dont need to do anything special in order to use sync code as promise.
Just return value that is ==true
==true
$.when((function() { return prompt('really?') })()).then((function() { return alert('yeah') })()).done((function () { alert('done') })())