Search code examples
multithreadingperlparallel-processingperl-module

Enable thread support for Perl in Windows?


I'm trying utilize threads in my Perl script, running on Windows 7. I'm unable to compile the script as Perl wasn't built with thread support when initially installed (the previous user installed Perl without thread support).

How can I rebuild Perl with thread support?

Thanks.


Solution

  • Most people use ActivePerl or Strawberry Perl on Windows, both of which have thread support enabled.


    That said, I find it very odd that you have a Perl without thread support on Windows. I think you could be mistaken. You can check if your Perl has thread support by using

    >perl -v | find "built for"
    ... for MSWin32-x86-multi-thread-64int
    

    or more directly with

    >perl -V:usethreads
    usethreads='define';