I'm trying to learn POE, and as with a lot of things, jumping into the deep end... sorry ahead of time if I'm missing any key knowledge.

I am writing a POE application that reads an XML Stream. Incoming XML data is used to fire a wheel that can run up to an hour.

Reading the cookbooks, I can see that POE can handle long running processes... My questions is how to best handle a queue of data with this long running process. I can send the message into a POE::Queue::Array but this is where I get lost in the docs.

What's the best way to handle reading the queue?

Should I be throwing a kernel yield when I am done one of the long running processes and handling that as an additional event to the kernel yield that is reading the data from the XML stream?

Are there any decent example of using POE::Queue in this type of application.

If I am approaching this the wrong way, feel free to say so. I do need to read the XML stream using POE due to vendor limitations.

THANKS!


In reply to POE, POE::Queue and long running tasks. by Devanchya

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.