samwyse has asked for the wisdom of the Perl Monks concerning the following question:
I have a precedence list, such as used in a topo sort, to determine which tasks need to wait for which other tasks to complete before they can run. In all but one case, each task needs to wait for all of it's preceding tasks to complete before it can execute, however tasks can and should be executed in parallel when ever possible. Every example that I have found for using the threads module starts all possible tasks at the same time and waits for them all to complete before proceeding. This is not what I need to do, I have a "skein" of tasks to be executed. (The one exception to the wait-for-all rule is that I have two tasks that need to wait for either of them to finish instead of both. One of the tasks is grepping a remote log file looking for a match, the other task is waiting for the remote machine to crash. If either task finishes, the other should be aborted and I can continue with the next step.)
Can anyone point me to a package or code that accomplishes what I need to do? Many thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A job scheduler for the threads module
by BrowserUk (Patriarch) on Dec 24, 2012 at 23:13 UTC | |
Re: A job scheduler for the threads module
by roboticus (Chancellor) on Dec 24, 2012 at 22:29 UTC | |
by samwyse (Scribe) on Dec 27, 2012 at 12:33 UTC |