Queue::Q::ClaimFIFO::Perl - In-memory Perl implementation of the ClaimFIFO queue
use Queue::Q::ClaimFIFO::Perl; my $q = Queue::Q::ClaimFIFO::Perl->new; # producer: $q->enqueue_item([qw(my data structure)]); # rinse repeat... # consumer: my $item = $q->claim_item; my $data = $item->data; # work with data... $q->mark_item_as_done($item); # Implementation dependent. For example: # - Fetch claimed items older X # - Requeue or log&drop those timed-out items # TODO API missing
Implements interface defined in Queue::Q::ClaimFIFO: a very simple in-memory implementation using a Perl array as the queue and Perl hash for keeping track of claimed items.
All methods of Queue::Q::ClaimFIFO.
Queue::Q::ClaimFIFO
Steffen Mueller, <smueller@cpan.org>
Copyright (C) 2012 by Steffen Mueller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.
To install Queue::Q, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Queue::Q
CPAN shell
perl -MCPAN -e shell install Queue::Q
For more information on module installation, please visit the detailed CPAN module installation guide.