| Class | ThreadsWait |
| In: |
lib/thwait.rb
|
| Parent: | Object |
This class watches for termination of multiple threads. Basic functionality (wait until specified threads have terminated) can be accessed through the class method ThreadsWait::all_waits. Finer control can be gained using instance methods.
Example:
ThreadsWait.all_wait(thr1, thr2, ...) do |t|
STDERR.puts "Thread #{t} has terminated."
end
| RCS_ID | = | '-$Id: thwait.rb,v 1.3 1998/06/26 03:19:34 keiju Exp keiju $-' |
| threads | [R] | Returns the array of threads in the wait queue. |
Waits until all specified threads have terminated. If a block is provided, it is executed for each thread termination.
Waits until all of the specified threads are terminated. If a block is supplied for the method, it is executed for each thread termination.
Raises exceptions in the same manner as next_wait.