Maybe "Queue" is a misnomer.
Maybe this class goes beyond generic routines.
So in cause of doubt ignore it.
I'd be already happy with "Array" and "CountArray".
However in my application "jumping" is needed.
In my opinion a wonderful example where nil holes can make sense.
The background: Lsyncd watches a file system through inotify.
When something happened it queues the events.
The order is important and chronological, therefore a queue.
It calls a rsync process to update a remote mirror.
Since a few versions ago it may run multiple rsync processes at the same time.
It includes logic which ones could intefer with each other.
When a rsync process finishes, the events that raised the process are dequeued.
This may not be the left or the right most.
Its a real life example that goes awry to theoretical principle of a queue.
Think of it in a real life queue in front of a counter
where, for the comfort of the customer,
to speed things up,
a second employee regulary goes up the line
and asks each person if he can help him already,
if what he needs is simple enough
so before he has to wait to reach the counter.
he is serverd.
Some people are helped that way
and can go home earlier.
That is removed right from within the queue.
- Axel
> --
> You received this message because you are subscribed to the Google Groups "lua table semantics" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
lua-table-seman...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>