Query: coro::rwlock
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
RWLock(3pm) User Contributed Perl Documentation RWLock(3pm)NAMECoro::RWLock - reader/write locksSYNOPSISuse 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 lockDESCRIPTIONThis 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".AUTHORMarc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/ perl v5.14.2 2012-04-13 RWLock(3pm)
Related Man Pages |
---|
pthread_rwlock_tryrdlock(3t) - hpux |
apr::threadrwlock(3) - osx |
apr::threadrwlock(3pm) - debian |
coro::signal(3pm) - debian |
coro::socket(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Introduction |
Detecting unused variables... |
A (ksh) Library For and From UNIX.com |
New UNIX and Linux History Sections |
My first PERL incarnation... Audio Oscillograph |