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

NAME

Forks::Queue::Shmem - Forks::Queue implementation using shared memory

SYNOPSIS

    use Forks::Queue::Shmem;
    $q = Forks::Queue::Shmem->new;

    use Forks::Queue;
    $q = Forks::Queue->new( impl => 'Shmem, ... );

VERSION

0.12

DESCRIPTION

Shared memory implementation of Forks::Queue. Only available on systems that have a /dev/shm virtual filesystem.

A shared memory implementation is appropriate for programs that rapidly update the queue but are not likely to let the size of data in the queue exceed the available memory on the host machine. Use Forks::Queue::File if you demand high capacity for your queue.

See Forks::Queue for the public API to this class.

Constructor options

In addition to the standard options described in the Forks::Queue constructor, the Forks::Queue::Shmem constructor also recognizes some additional options:

  • file

    The name of the filename to hold the queue data. An absolute pathname should not be provided here. The virtual queue file will reside under the shared memory virtual filesystem (probably /dev/shm) on your system, if it exists.

  • style

  • limit

  • on_limit

  • join

  • persist

    See "new" in Forks::Queue for descriptions of these options.

LICENSE AND COPYRIGHT

Copyright (c) 2017-2019, Marty O'Brien.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.

See http://dev.perl.org/licenses/ for more information.