Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 chanting in the Monastery: (2)
As of 2025-03-16 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (54 votes). Check out past polls.