This sort of technique isn't dependent on generators - they just take care of one annoying issue. I wrote djax (djax.mindcontroldogs.com) which does a similar sort of transformation and could be adapted to use generators.
The advantages are (sort of) pre-emptive threads that would be perfect for the sort of long-running cryptography you're talking about. It's one of the things I had in mind while working on djax. The reason I haven't (or even looked much at djax since the initial code release) is that I haven't been able to get around the significant code-size and speed overhead this sort of technique involves. Normally well more than 2x larger & 10x slower. So for now, I've altered my cryptographic code to run itself for one loop then schedule itself inside a setTimeout, for a sort of poor mans threading. Hamish Friedlander Mind Control Dogs --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
