IPC-Concurrency

 view release on metacpan or  search on metacpan

lib/IPC/Concurrency.pm  view on Meta::CPAN


Example:

    package Scanner::GUI;
    
    use IPC::Concurrency;
    
    my $c = IPC::Concurrency->new('SCNR');
    
    while (not $c->get_slot(1)) {
        print 'Scanner is busy', $/;
        sleep 4;
    }
    
    run_scanner_gui();

This code will wait till every other 'SCNR' processes are not active.
It's much more simple approach than grepping 'ps aux' table or creating lockfiles.

--



( run in 0.419 second using v1.01-cache-2.11-cpan-87723dcf8b7 )