Ruby ThreadsWait Functions

EditRocket provides the following information on ThreadsWait functions in the Ruby source code builder.

all_waits(*threads) - Waits until all specified threads have terminated. If a block is provided, it is executed for each thread termination.

all_waits(*threads) - Waits until all specified threads have terminated. If a block is provided, it is executed for each thread termination.

empty?() - Returns true if there are no threads to be synchronized.

finished?() - Returns true if any thread has terminated.

join(*threads) - Waits for specified threads to terminate.

join_nowait(*threads) - Specifies the threads that this object will wait for, but does not actually wait.

new(*threads) - Creates a ThreadsWait object, specifying the threads to wait on. Non-blocking.

next_wait(nonblock = nil) - Waits until any of the specified threads has terminated, and returns the one that does.