
| Current Path : /usr/share/doc/libipc-shareable-perl/examples/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //usr/share/doc/libipc-shareable-perl/examples/get |
#!/usr/bin/perl -w
#
# Test of shared arrays courtesy Terry Ewing <terry@intevo.com>
# See also eg/put
use lib ".";
use IPC::Shareable;
use strict;
my @shared;
my $ipch = tie @shared, 'IPC::Shareable',
"foco",
{ create => 1,
exclusive => 'no',
mode => 0666,
size => 1024*512
};
while (1) {
$ipch->shlock;
my $line = shift(@shared);
$ipch->shunlock;
if ($line) {
print $line."\n";
}
# sleep(2);
}