Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

perl version single/multithreaed

by ghosh123 (Monk)
on Aug 07, 2013 at 08:33 UTC ( #1048291=perlquestion: print w/replies, xml ) Need Help??

ghosh123 has asked for the wisdom of the Perl Monks concerning the following question:

Hi ,
I want to know which perl version is single threaed and which version is multithreaded ?

Replies are listed 'Best First'.
Re: perl version single/multithreaed
by Corion (Patriarch) on Aug 07, 2013 at 08:39 UTC
    perl -V:usethreads

    will tell you that.

    Also see, which has the same information:

    use Config '%Config'; print $Config{ usethreads };

    A conceptual problem with your question may be that you think that only certain version numbers of Perl come threaded or unthreaded. This is a misconception. Perl can be built with or without threads in any version number starting since 5.6 (or even earlier). Whether you have threads available depends on the person who built your Perl binary and whether they enabled that option or not.

      Well, I am usnig perl 5.8.8 which I think is single threaded. But I want to move to a multi-threaded perl version. Can you please confirm if perl 5.10 is multithreaded or not ? Or multi-threading is supported in 5.8.8 as well ?
      Consider that threads are enabled in the perl binary.

        5.8.8 can be multi-threaded; it depends on how it was compiled.

        5.10.x can be single-threaded; it depends on how it was compiled.

        Run this command on your machine and post the output: perl -V

        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1048291]
Approved by vinoth.ree
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-05-16 19:32 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (63 votes). Check out past polls.