Last Modified
2014-07-31 09:02:17 -0700
Requires
  • thread.rb
  • e2mmap.rb

Description

thwait.rb - thread synchronization class
    $Release Version: 0.9 $
    $Revision: 1.3 $
    $Date: 1998/06/26 03:19:34 $
    by Keiju ISHITSUKA(Nihpon Rational Software Co.,Ltd.)

feature:
provides synchronization for multiple threads.

class methods:
* ThreadsWait.all_waits(thread1,...)
  waits until all of specified threads are terminated.
  if a block is supplied for the method, evaluates it for
  each thread termination.
* th = ThreadsWait.new(thread1,...)
  creates synchronization object, specifying thread(s) to wait.

methods:
* th.threads
  list threads to be synchronized
* th.empty?
  is there any thread to be synchronized.
* th.finished?
  is there already terminated thread.
* th.join(thread1,...) 
  wait for specified thread(s).
* th.join_nowait(threa1,...)
  specifies thread(s) to wait.  non-blocking.
* th.next_wait
  waits until any of specified threads is terminated.
* th.all_waits
  waits until all of specified threads are terminated.
  if a block is supplied for the method, evaluates it for
  each thread termination.

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus