On 6/27/07, Giulio Cesare Solaroli <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > a colleague has just pointed me to this post on Javascript threading: > http://www.neilmix.com/2007/02/07/threading-in-javascript-17/ > > I have to admit that I did not read the whole articole very careful, > but I had the impression that the suggested solution, even if using > different terms, was aiming at solving the same problem that Mochikit > own Deferred objects solve.
You can sorta use generators to do what a deferred does, but you'd be rewriting a fair amount of what a deferred encapsulates. You can also use deferreds in conjunction with generators as well using a trampoline. Basically the trampoline would set the deferred's callbacks to methods on the generator object (next and throw, or whatever it's called in js), so you could yield a deferred and the result or exception would be the callback or errback. -bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
