Fisrt, take a look at POD for thread on Perl:

Perl threads tutorial (threads)
Old Perl threads tutorial (Thread)

Note that Perl 5.7+ has a new thread implementation, called ithreads, in the module "threads", and you still can access the old implementation, in the module Thread.

I don't know if the module Thread::Queue will work with ithreads (threads), since this module was inside the old way (Thread)!

You can see in the end of Thread POD, this comments on "See Also":

threads::shared (not available with 5005threads)

attributes, Thread::Queue, Thread::Semaphore, Thread::Specific (not available with ithreads)

Take a look at threads::share and the lock() function for a safe way to work with a shared list (since Thread::Queue is for a shared data structure, like a list).

Graciliano M. P.
"The creativity is the expression of the liberty".


In reply to Re: Thread::Queue and Memory by gmpassos
in thread Thread::Queue and Memory by petesmiley

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.