The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::XS::Queue::Array - an XS implementation of POE::Queue::Array.

SYNOPSIS

See POE::Queue.

DESCRIPTION

This class is an implementation of the abstract POE::Queue interface. It implements a priority queue using C, with an XS interface supplied.

The current implementation could use some optimization, especially for large queues.

Please see the POE::Queue documentation, which explains this one's functions, features, and behavior.

The following extra methods are added beyond POE::Queue::Array:

dump

Dumps the internal structure of the queue to stderr.

verify

Does limited verification of the structure of the queue. If the verification fails then a message is sent to stderr and the queue is dumped as with the dump() method, and your program will exit.

SEE ALSO

POE, POE::Queue, POE::Queue::Array

BUGS

None known.

Some possible improvements include:

  • use a B-Tree for the queue (not a binary tree, a B-Tree), though this would require a module rename.

  • use a custom hash instead of a HV for the id to priority mapping, either glib's hash or convert to C++ and use the STL map.

  • some of the XS code could be optimized to do less work in scalar context, pq_remove_items and pq_peek_items could avoid building all those array refs.

LICENSE

POE::XS::Queue::Array is licensed under the same terms as Perl itself.

AUTHOR

Tony Cook <tonyc@cpan.org>