in reply to threads question

The simplest solution is to use one or more instances of Thread::Queue to pass the data between your threads.

A super search for "Thread::Queue" will turn up many examples to get you started.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon

Replies are listed 'Best First'.
Re^2: threads question
by Forsaken (Friar) on Jul 17, 2004 at 13:26 UTC
    Ah, indeed, silly me. Never thought all the Thread::something modules were actually intended to work with the threads module, due to the difference in name. Looks like a whole lotta sexy code just waiting for me to put it to good use.

    Many thanks indeed.

      Yes. The namespaces are confusing.

      Unfortunately, several of the Thread::* modules intended for use with 5005threads are non-useful with ithreads, but will likely never be removed or upgraded.

      The good news is that liz generated several new modules that are. Thread::Use is small and rather uninspiringly named, but extremely Use-ful.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
        it is indeed :-) saves me a good chunk of memory even with just 5 threads running. Tx for the tip.