sub consumer { while( my($returned_value) = $queue->dequeue ) { printf "I have been returned: %i\n", $returned_value; } }
I think you're being fooled by printf(). The "%i" turns an undef value into 0.
Liz
In reply to Re: What is the correct way to use Thread::Queue::Any ?
by liz
in thread What is the correct way to use Thread::Queue::Any ?
by fx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |