Specific(3pm) User Contributed Perl Documentation Specific(3pm)NAME
Coro::Specific - manage coroutine-specific variables.
SYNOPSIS
use Coro::Specific;
my $ref = new Coro::Specific;
$$ref = 5;
print $$ref;
DESCRIPTION
This module can be used to create variables (or better: references to them) that are specific to the currently executing coroutine. This
module does not automatically load the Coro module (so the overhead will be small when no coroutines are used).
A much faster method is to store extra keys into %$Coro::current - all you have to do is to make sure that the key is unique (e.g. by
prefixing it with your module name). You can even store data there before loading the Coro module - when Coro is loaded, the keys stored in
%$Coro::current are automatically attached to the coro thread executing the main program.
You don't have to load "Coro::Specific" manually, it will be loaded automatically when you "use Coro" and call the "new" constructor.
new Create a new coroutine-specific scalar and return a reference to it. The scalar is guarenteed to be "undef". Once such a scalar has
been allocated you cannot deallocate it (yet), so allocate only when you must.
BUGS
The actual coroutine specific values do not automatically get destroyed when the Coro::Specific object gets destroyed.
AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/
perl v5.14.2 2012-04-13 Specific(3pm)
Check Out this Related Man Page
Signal(3pm) User Contributed Perl Documentation Signal(3pm)NAME
Coro::Signal - thread signals (binary semaphores)
SYNOPSIS
use Coro;
$sig = new Coro::Signal;
$sig->wait; # wait for signal
# ... some other "thread"
$sig->send;
DESCRIPTION
This module implements signals/binary semaphores/condition variables (basically all the same thing). You can wait for a signal to occur or
send it, in which case it will wake up one waiter, or it can be broadcast, waking up all waiters.
It is recommended not to mix "send" and "broadcast" calls on the same "Coro::Signal" - it should work as documented, but it can easily
confuse you :->
You don't have to load "Coro::Signal" manually, it will be loaded automatically when you "use Coro" and call the "new" constructor.
$sig = new Coro::Signal;
Create a new signal.
$sig->wait
Wait for the signal to occur (via either "send" or "broadcast"). Returns immediately if the signal has been sent before.
$sem->wait ($callback)
If you pass a callback argument to "wait", it will not wait, but immediately return. The callback will be called under the same
conditions as "wait" without arguments would continue the thrad.
The callback might wake up any number of threads, but is NOT allowed to block (switch to other threads).
$sig->send
Send the signal, waking up one waiting process or remember the signal if no process is waiting.
$sig->broadcast
Send the signal, waking up all waiting process. If no process is waiting the signal is lost.
$sig->awaited
Return true when the signal is being awaited by some process.
AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://home.schmorp.de/
perl v5.14.2 2012-04-13 Signal(3pm)
Hi everyone,
I need to write some AIX scripts (ksh?), kind of fast so I'm looking for somewhere to get a crash course in it. Are there any AIX Specific Scripting resource sites that anyone can recommend, really not getting a whole lot from google.
Thanks in advance,
Darren (3 Replies)
I've got a problem site that I need to block all referrers, but if possible, I'd really like to ban all ip's at the same time so that they can't figure out a way around it.
Any ideas? (4 Replies)
Hi Eveyone,
I am working on one shell script to find the specific records from data file and add the totals into variables and print them. you can find the sample data file below for more clarification.
Sample Data File:
PXSTYL00__20090803USA
CHCART00__20090803IND... (7 Replies)
There is file named .htaccess. It is located in many directories on my web server. Instead of manually editing each file to add specific text, i thought there is possibly a command which will allow me to do that.
What i need to be done exactly?
In all .htaccess files i need to add/append the... (2 Replies)
I'm still beginner and maybe someone can help me.
I have this input:
the great warrior a, b, c
and what i want to know is, with awk, how can i detect the string with 'warrior' string on it and print the a, b, and c seperately, become like this :
Warrior Type
a
b
c
Im still very... (3 Replies)
Hey Guys, im looking for a script that will work under OSX.
What i want to do is copy information from one file (Specific LIne) and write it to a certain line in another. To be more specific...
I want the hostname of a mac to be gathered ( i assume its stored in a .plist file somewhere) and... (2 Replies)
Hi,
I am trying to extract a specific information from a file which contains more than 200 million records. Attached the input file for your reference.
My file contains information below
... (4 Replies)
I have a text file containing 2 exec statements as below and trying to store the below 2 execs into 2 different scalar variables in perl.
/* ICD Dist, Total */ /* need to export to Excel, sheet=ICD_Dist__Total */
exec(
'select sum(count(*))
cast(count(*)*100.0/sum(count(*)) over() as... (7 Replies)
Hi Team,
I have requirement to replace Language Specific Characters in File.
We have set of characters, it should be replaced to a different character in the file.
I have around 38 characters which should replaced to different destination character.
Please help.
Thanks
Bharat (3 Replies)