27 Apr 2005 27 Apr '05
Deferreds don't re-arrange processing, or make functions asynchronous, or anything like that. They only hook a result up with one or more functions for handling the result. The result is often only available after the callback functions have been defined and added to the Deferred, but if it is available beforehand, nothing significant really changes.
Put another way: if a Deferred has a callback, when it is given a result, the callback is invoked immediately; if a Deferred has a result, when it is given a callback, the callback is invoked immediately.