Coro::RWLock man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

RWLock(3)	      User Contributed Perl Documentation	     RWLock(3)

NAME
       Coro::RWLock - reader/write locks

SYNOPSIS
	use Coro;

	$lck = new Coro::RWLock;

	$lck->rdlock; # acquire read lock
	$lck->unlock; # unlock lock again

	# or:
	$lck->wrlock; # acquire write lock
	$lck->tryrdlock; # try a readlock
	$lck->trywrlock; # try a write lock

DESCRIPTION
       This module implements reader/write locks. A read can be acquired for
       read by many coroutines in parallel as long as no writer has locked it
       (shared access). A single write lock can be acquired when no readers
       exist. RWLocks basically allow many concurrent readers (without
       writers) OR a single writer (but no readers).

       You don't have to load "Coro::RWLock" manually, it will be loaded
       automatically when you "use Coro" and call the "new" constructor.

       $l = new Coro::RWLock;
	   Create a new reader/writer lock.

       $l->rdlock
	   Acquire a read lock.

       $l->tryrdlock
	   Try to acquire a read lock.

       $l->wrlock
	   Acquire a write lock.

       $l->trywrlock
	   Try to acquire a write lock.

       $l->unlock
	   Give up a previous "rdlock" or "wrlock".

AUTHOR
	Marc Lehmann <schmorp@schmorp.de>
	http://home.schmorp.de/

perl v5.14.2			  2011-11-11			     RWLock(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net