Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Bareword "threads::joinable" not allowed while "strict subs" in use

by BrowserUk (Pope)
on Dec 26, 2013 at 19:18 UTC ( #1068453=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Bareword "threads::joinable" not allowed while "strict subs" in use
in thread Bareword "threads::joinable" not allowed while "strict subs" in use

Indeed it can. But I've no idea if the latest threads would work with such an old perl.


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.


Comment on Re^3: Bareword "threads::joinable" not allowed while "strict subs" in use
Re^4: Bareword "threads::joinable" not allowed while "strict subs" in use
by Anonymous Monk on Dec 26, 2013 at 23:37 UTC
Re^4: Bareword "threads::joinable" not allowed while "strict subs" in use
by lifang11 (Initiate) on Dec 27, 2013 at 09:59 UTC

    Thanks for all above!

    The perl is too old,but update is too difficult to achieve.

    I have 20+ machines and 3+ projects running more than 3+ years.

    I don't know the result after update perl.

      This must be new code otherwise you wouldn't only now be discovering that threads::joinable isn't available.

      So, why not install a new version in parallel and run your new code on that?


      Your sample code does nothing useful, so I cannot safely advise how to re-write it so that you do not need joinable; but if your threads are not returning anything, why join them at all?

      You could just detach them and let them go away naturally; but then you need to have a mechanism for deciding when your main thread can end.

      Alternatively; why test for joinable? Most of the time you want to wait for them all to end; so a simple:

      $_->join for @threads;

      Is all that is required.

      But again, given silly sample code, it is impossible to advise which strategy makes sense in your case.


      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.

      "I don't know the result after update perl."

      Sounds like a situation I was in. Install your own perl elsewhere on your system, test your apps against the new version.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (19)
As of 2014-09-19 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls