in reply to Re^3: Should I use threads? Perl/DHCP/Radius
in thread Should I use threads? Perl/DHCP/Radius
I would use Threads::Queue to send messages back from your threads to your main thread instead of polling them for becoming ->joinable.
For passing thread results back otherwise, see threads, which documents the return value of ->join(). I would avoid using that, because to get more speed, you will want to keep a pool of worker threads and pass the queries to them using another Thread::Queue instead, thus saving the cost of creating and destroying a new thread for every request.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Should I use threads? Perl/DHCP/Radius
by MonkeyMonk (Sexton) on Aug 25, 2010 at 14:12 UTC | |
by Corion (Patriarch) on Aug 25, 2010 at 14:14 UTC |