Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Hanging Threads

by Ninthwave (Chaplain)
on Aug 18, 2007 at 05:48 UTC ( [id://633433]=note: print w/replies, xml ) Need Help??


in reply to Hanging Threads

Where do you test for the UNDEF that ->dequeue_nb returns when it hits the end of the queue?

To quote Thread::Queue
"dequeue_nb The dequeue_nb method, like the dequeue method, removes a scalar from the head of the queue and returns it. Unlike dequeue, though, dequeue_nb won't block if the queue is empty, instead returning undef. "
"No matter where you go, there you are." BB

Replies are listed 'Best First'.
Re^2: Hanging Threads
by WalkingZero (Sexton) on Aug 18, 2007 at 05:50 UTC
    Arg if you read the previous reply ignore it. I need to read more clearly. I am using the Queue's pending function and testing for that in the while loop. Like I said the loop breaks cleanly. it just hangs in the sub though for some reason.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://633433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-13 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found