can regular perl program have multiple sub working at sametime?
Sure can:
use threads;
async{
print "I'm doing this over here while he's...", sleep 1 while 1
};
print "doing that over there, while...", sleep 1 while 1;
I'm doing this over here while he's... 1.001
doing that over there, while... 1.001
I'm doing this over here while he's... 0.999772
doing that over there, while... 0.999429
I'm doing this over here while he's... 0.999626
doing that over there, while... 0.99956
I'm doing this over here while he's... 0.999724
doing that over there, while... 0.999355
Terminating on signal SIGINT(2)
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|