Hi Corion,

Well i can use the Parallel::ForkManager for spawning children agreed though i m able to do that thru my way as well .. but the real problem is after i have created threads into each child process .Lets say that the no of threads are 3, now each thread is processing data that it has been passed, in batches after finishing one batch it lets the main thread know that it has done its first batch and suspends its operation.Now the main thread would launch a new thread to work on the result of the 1st thread and resume the suspended thread to continue its work.

The app that i m designing has to launch multiple queries on some server.The queries have placeholders(e.g <CLIENT> is a place holder) which are replaced at runtime. There are numerous queries and clients.A serial/single process approach would not help in speeding up things, so i thought of this model.Script starts forks 5 chidren each child picks a query and client list and then constructs 3 threads and passes divided client list to each thread.Now inside each thread the thread reads the query replaces the client fires to prod and test. AFter this it lets the main thread know that it is done and its time the main thread does comparison.The main thread constructs a new thread to do that and lets its sub thread continue with the batch.

The rationale behind launching multiple threads doing similar and different task is to increase the speed by parallel processing and reducing dependecy . As in the above case when the results as availble y wait in the same thread for comparison instead let the main thread know, which would launch a new comarison thread and let the old thread continue firing query

Thanks

In reply to Re^2: Problem in Inter Process Communication by libvenus
in thread Problem in Inter Process Communication by libvenus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.