Thread::RWLock

RWLock implementation for Perl threads
Download

Thread::RWLock Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Andreas Ferber
  • Publisher web site:
  • http://search.cpan.org/~aferber/

Thread::RWLock Tags


Thread::RWLock Description

RWLock implementation for Perl threads RWLocks provide a mechanism to regulate access to resources. Multiple concurrent reader may hold the rwlock at the same time, while a writer holds the lock exclusively.New reader threads are blocked if any writer are currently waiting to obtain the lock. The read lock gets through after all write lock requests have completed.Thread::RWLock also takes into account that one thread may obtain multiple readlocks at the same time and prevents deadlocking in this case.SYNOPSIS use Thread::RWLock; my $rwlock = new Thread::RWLock; # Reader $rwlock->down_read; $rwlock->up_read; # Writer $rwlock->down_write; $rwlock->up_write; Requirements: · Perl


Thread::RWLock Related Software