Fellow friar, frequent flights of fancy flip my fallow folds. But I would consider using threads. Why? It seems you need alot of interprocess communication, and threads make it easy. You can setup alot of shared variables and a loop or timer mechanism to track them. You can have a set of shared variables in each thread to store it's current parameters, so you can restart it. You can reuse threads too. In a threaded app, if any thread runs "exit" it will kill all threads.
But exactly how you setup your threads depends on things like what are they doing, do you want to reuse them, how many simultaneously running threads do you want? SuperSearch here for threads, or groups.google.com will yield many examples.
Generally I like to run threads and have the main parent thread just act as a controller( watching, reading shared vars, etc). It is convenient to do it with an event-loop system like POE, Tk, Gtk2, or even GLib (my current commandline favorite).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.