Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: $thread->done() in perl 5.8.8 - catching slow threads

by imrags (Monk)
on Jul 07, 2009 at 07:21 UTC ( #777763=note: print w/replies, xml ) Need Help??

in reply to $thread->done() in perl 5.8.8 - catching slow threads

"Tid" is the thread id which is unique and is given to each thread
thread->list returns a list of thread objects, one for each thread that's currently running
foreach my $thr (threads->list()) { ##DO something }
Read Threads for more information, it's not best but you can refer it for list purpose.
Returns true if a thread is still running (i.e., if its entry point function has not yet finished or exited).
Returns true if the thread has finished running, is not detached and has not yet been joined.
In other words, the thread is ready to be joined, and a call to $thr->join() will not block.
With no arguments (or using threads::all ) and in a list context, returns a list of all non-joined,
non-detached threads objects. In a scalar context, returns a count of the same.
With a true argument (using threads::running ), returns a list of all non-joined,
non-detached threads objects that are still running.
With a false argument (using threads::joinable ), returns a list of all non-joined, non-detached
threads objects that have finished running (i.e., for which ->join() will not block).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://777763]
[stevieb]: I *finally* have my automated RPi::WiringPi and related distribution automated test build system done! It's easy to use (relatively), simple to set up, and works awesome! Cycles every X mins, checks github for new commits, and builds...
[stevieb]: ...optionally displaying the results to a connected LCD with the dist name, date, time and commit of the last run along with a FAIL/PASS. Obviously I can't get CI with Travis for a RPi, so I built my own :) It'll take a couple of blog posts I think...
[stevieb]: cover it all. Awesome thing is that you can dispatch ANY distribution to it (and include all revdeps if desired), and it works all the same as if I'm just testing the RPI code itself
[stevieb]: I'm rather pleased with myself and everything I've leared along this arduous and sometimes frustrating path
[stevieb]: Just need to implement an email plugin or something so I can get alerted remotely if the status of a build has changed from the last run

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2017-04-28 21:44 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (529 votes). Check out past polls.