On 8/28/06, paul <[EMAIL PROTECTED]> wrote:
>
> I've done some decent implementations of a Queue and a Stack that I
> think would be a worthwhile part of MochiKit.  They're useful in places
> where linear time element insertion and removal are important.  The
> Queue is particularly useful in most places that Array.shift() is being
> used (as with Deferred's chain).
>
> There's an AsyncQueue along with that which returns a Deferred on
> get(), fired when an element is available.
>
> I thought I should mention it here before committing, because (a) I'm
> not completely certain this is the sort of thing Bob wants in MochiKit;
> and (b) I'm not sure where to put it.  It fits the type of thing we
> find in Base, but maybe it's not useful enough for general users to
> contribute to making Base bigger.  Thoughts?

Have you done any benchmarks of Queue and Stack vs. using an Array?
I'd like to know at about what size (if any) that a Queue or Stack
abstraction becomes faster. I can't imagine it'd make sense to use it
for Deferred, given that chains don't get all that long...

AsyncQueue sounds like a good addition to Async, though.

-bob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to