NAME

Scaffold::Lockmgr::UnixMutex - Use SysV semaphores for resource locking.

SYNOPSIS

use Scaffold::Server;
use Scaffold::Lockmgr::UnixMutex;

my $psgi_handler;

main: {

   my $server = Scaffold::Server->new(
       lockmgr => Scaffold::Lockmgr::UnixMutex->new(
           key     => 1234,
           nsems   => 32,
           timeout => 10,
           limit   => 10
       },
   );

   $psgi_hander = $server->engine->psgi_handler();

}

DESCRIPTION

This implenments general purpose resource locking with SysV semaphores.

CONFIGURATION

key

This is a numeric key to identify the semaphore set. The default is a hash of "scaffold".

nsems

The number of semaphores in the semaphore set. The default is dependent on platform.

linux - 250
aix   - 250
bsd   - 8
other - 16
timeout

The number of seconds to sleep if the lock is not available. Default is 10 seconds.

limit

The number of attempts to try the lock. If the limit is passed an exception is thrown. The default is 10.

SEE ALSO

Scaffold
Scaffold::Base
Scaffold::Cache
Scaffold::Cache::FastMmap
Scaffold::Cache::Manager
Scaffold::Cache::Memcached
Scaffold::Class
Scaffold::Constants
Scaffold::Engine
Scaffold::Handler
Scaffold::Handler::Default
Scaffold::Handler::Favicon
Scaffold::Handler::Robots
Scaffold::Handler::Static
Scaffold::Lockmgr
Scaffold::Lockmgr::KeyedMutex
Scaffold::Lockmgr::UnixMutex
Scaffold::Plugins
Scaffold::Render
Scaffold::Render::Default
Scaffold::Render::TT
Scaffold::Routes
Scaffold::Server
Scaffold::Session::Manager
Scaffold::Stash
Scaffold::Stash::Controller
Scaffold::Stash::Cookie
Scaffold::Stash::View
Scaffold::Uaf::Authenticate
Scaffold::Uaf::AuthorizeFactory
Scaffold::Uaf::Authorize
Scaffold::Uaf::GrantAllRule
Scaffold::Uaf::Login
Scaffold::Uaf::Logout
Scaffold::Uaf::Manager
Scaffold::Uaf::Rule
Scaffold::Uaf::User
Scaffold::Utils

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2010 by Kevin L. Esteb

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.5 or, at your option, any later version of Perl 5 you may have available.