Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: How can I force thread switching?

by sundialsvc4 (Abbot)
on Sep 29, 2013 at 20:36 UTC ( #1056257=note: print w/replies, xml ) Need Help??

in reply to How can I force thread switching?

What?   Did I hear my name used in vain, on such a pleasant Sunday morn?

He has a point:   use a thread to enqueue the jobs for the other threads.   This thread is the “nanny,” whose only purpose is to keep the children fed.   (Or in the good ol’ days, it is the Job Entry Subsystem of what was then called MVS now z/OS.)   It runs until it runs out of food, then quits.   If that thread winds up waiting-forever, so what.

The bottom line is that the parent does not have to be directly responsible for job-queueing.   The parent does not have to wait for it, and so, job-queueing will occur properly no matter what the user (interface ...) is or is not doing.   It is no longer “the parent’s concern.”   The parent’s only concern, now, is to run the user-interface until all of its children die (or until “the last man standing” is the scheduler).   Although the responsibilities of one particular child are somewhat greater than that of all the others, the parent has no need to “be concerned.”

It’s very hard, in any language, to have a (especially, to have a parent) thread with two concerns, and also to be both user-facing and peer-facing at the same time.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056257]
[LanX]: I remeber M::S (it was dialog driven?) to be buggy
[stevieb]: As far as Dist::Zilla goes, I don't like installing that other than on systems my test platorm runs on. I find it too heavy. I prefer being able to glean a Makefile.PL
[LanX]: what's frustrating me is that a distribution has lots of dupplicated info
[stevieb]: LanX I don't know if it's dialog driven; I just use it in the simplest of terms (just run module-starter at the CLI, and the very last couple of lines are how I use it.
[stevieb]: which dist are you speaking of regarding dups, LanX?
[LanX]: readme version number and so on ...
[stevieb]: with M::S, you can also add other tags, but defaults work... such as --license=perl --eumm
[LanX]: I'm not a big fan of pure make, apparently the auto generated ones are so complicated to be able to work with all possible makes
[stevieb]: I find the M::S makefiles it generates are quite straight forward, and I usually have to add a few things (github info etc). They're about 15 lines or so give or take.
[Corion]: I don't think the EUMM-generated Makefile is that complicated ;)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2017-08-18 20:56 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (310 votes). Check out past polls.