File-Locate-Iterator
view release on metacpan or search on metacpan
lib/File/Locate/Iterator.pm view on Meta::CPAN
state must be held in some sort of variable to be progressed by calls from
the main loop. Note that C<next()> will block on reading from the database,
so the database should generally be a plain file rather than a socket or
something, so as not to hold up a main loop.
If you have the recommended C<File::Map> module then iterators share an
C<mmap()> of the database file. Otherwise the database file is a separate
open handle in each iterator, meaning a file descriptor and PerlIO buffering
each. Sharing a handle and having each seek to its desired position would
be possible, but a seek drops buffered data so would be slower. Maybe some
hairy C<PerlIO> or C<IO::Handle> trickery could transparently share an fd
and keep buffered blocks from multiple file positions.
=head1 SEE ALSO
L<Iterator::Locate>, L<Iterator::Simple::Locate>,
L<MooseX::Iterator::Locate>
L<File::Locate>, L<locate(1)>, L<locatedb(5)>, GNU Findutils manual,
L<File::FnMatch>, L<File::Map>
( run in 0.503 second using v1.01-cache-2.11-cpan-0a6323c29d9 )