Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Threading with a twist

by Anonymous Monk
on Oct 03, 2017 at 04:50 UTC ( [id://1200565]=note: print w/replies, xml ) Need Help??


in reply to Threading with a twist

Hi

Have seen a lot of posts about not using Perl library 'X' for pools/etc. For 5.24 (or better) is that still the prevailing perspective? (eg: no better mouse trap)

:) what are you asking?

I've seen all the posts, you don't know what you're asking, and that is an answer in itself

Have seen the use of "usleep", is that the best method for "idling" a worker thread?

That is pretty much the only method for idiling, nothing else is idle.

Is there a way to achieve the benefit of the while loop (avoid CPU cycle consumption while idle), but then issue of providing results to <STDOUT> the moment (or very close to when) they are available?

What is a moment?

Thats not just a question, that is the answer , that is how long you should (ask to) idle.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-24 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found