sectokia has asked for the wisdom of the Perl Monks concerning the following question:

Hi Perl Monks,

I have a multithreaded perl script which uses select RBITS,WBITS,EBITS,TIMEOUT to wait for data to be available from various files/sockets etc.

How can I incorporate Thread::Queue into select, so I can use select to know when a Queue has a message in it?

Thanks!

Replies are listed 'Best First'.
Re: select on thread queue
by Anonymous Monk on May 07, 2016 at 00:02 UTC
    simply use dequeue_nb or dequeue_timed instead of dequeue