Linux web0273.sh.tyo1 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64
Apache
: 127.0.0.1 | : 216.73.216.229
Cant Read [ /etc/named.conf ]
8.3.31
r2745769
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
lib64 /
perl5 /
Coro /
[ HOME SHELL ]
Name
Size
Permission
Action
AIO.pm
4.53
KB
-rw-r--r--
AnyEvent.pm
13.27
KB
-rw-r--r--
BDB.pm
1.48
KB
-rw-r--r--
Channel.pm
3.96
KB
-rw-r--r--
CoroAPI.h
4.57
KB
-rw-r--r--
Debug.pm
16.07
KB
-rw-r--r--
EV.pm
2.56
KB
-rw-r--r--
Event.pm
5.3
KB
-rw-r--r--
Handle.pm
13.5
KB
-rw-r--r--
Intro.pod
26.15
KB
-rw-r--r--
LWP.pm
3.92
KB
-rw-r--r--
MakeMaker.pm
3.66
KB
-rw-r--r--
RWLock.pm
2.13
KB
-rw-r--r--
Select.pm
3.74
KB
-rw-r--r--
Semaphore.pm
4.31
KB
-rw-r--r--
SemaphoreSet.pm
4.1
KB
-rw-r--r--
Signal.pm
2.24
KB
-rw-r--r--
Socket.pm
5.34
KB
-rw-r--r--
Specific.pm
1.79
KB
-rw-r--r--
State.pm
18.98
KB
-rw-r--r--
Storable.pm
3.68
KB
-rw-r--r--
Timer.pm
1.62
KB
-rw-r--r--
Util.pm
5.44
KB
-rw-r--r--
jit-amd64-unix.pl
2.69
KB
-rw-r--r--
jit-x86-unix.pl
2.89
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : RWLock.pm
=head1 NAME Coro::RWLock - reader/write locks =head1 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 =head1 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 C<Coro::RWLock> manually, it will be loaded automatically when you C<use Coro> and call the C<new> constructor. =over 4 =cut package Coro::RWLock; use common::sense; use Coro (); our $VERSION = 6.514; =item $l = new Coro::RWLock; Create a new reader/writer lock. =cut sub new { # [rdcount, [readqueue], wrcount, [writequeue]] bless [0, [], 0, []], $_[0]; } =item $l->rdlock Acquire a read lock. =item $l->tryrdlock Try to acquire a read lock. =cut sub rdlock { while ($_[0][0]) { push @{$_[0][3]}, $Coro::current; &Coro::schedule; } ++$_[0][2]; } sub tryrdlock { return if $_[0][0]; ++$_[0][2]; } =item $l->wrlock Acquire a write lock. =item $l->trywrlock Try to acquire a write lock. =cut sub wrlock { while ($_[0][0] || $_[0][2]) { push @{$_[0][1]}, $Coro::current; &Coro::schedule; } ++$_[0][0]; } sub trywrlock { return if $_[0][0] || $_[0][2]; ++$_[0][0]; } =item $l->unlock Give up a previous C<rdlock> or C<wrlock>. =cut sub unlock { # either we are a reader or a writer. decrement accordingly. if ($_[0][2]) { return if --$_[0][2]; } else { $_[0][0]--; } # now we have the choice between waking up a reader or a writer. we choose the writer. if (@{$_[0][1]}) { (shift @{$_[0][1]})->ready; } elsif (@{$_[0][3]}) { (shift @{$_[0][3]})->ready; } } 1; =back =head1 AUTHOR/SUPPORT/CONTACT Marc A. Lehmann <schmorp@schmorp.de> http://software.schmorp.de/pkg/Coro.html =cut
Close