Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How to Optionally enable threads in Perl 5.10.0

by DrWhy (Chaplain)
on Aug 09, 2010 at 18:27 UTC ( [id://853896]=note: print w/replies, xml ) Need Help??


in reply to Re: How to Optionally enable threads in Perl 5.10.0
in thread How to Optionally enable threads in Perl 5.10.0

Yeah, I did the same thing just now:
C:\Documents and Settings\Mine>c:\Perl5.10\bin\perl.exe -e "eval 'use +threads'; print \"$@\"; $t1 = threads->create(sub {print '1'}); $t2 = + threads->create(sub{print '2'}); $t1->join; $t2->join();" 12 C:\Documents and Settings\Mine>
Requiring in diff't modules in the case at hand doesn't make much since. I'm only doing thread work in the main script, so the '*threaded' module would just contain the 'use threads' statement and the '*notthreaded' module would be empty (or just wouldn't exist).

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://853896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2026-04-16 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.