[前][次][番号順一覧][スレッド一覧]

ruby-changes:13221

From: nobu <ko1@a...>
Date: Thu, 17 Sep 2009 13:52:52 +0900 (JST)
Subject: [ruby-changes:13221] Ruby:r24978 (trunk): * thread.c: added rdocs.

nobu	2009-09-17 13:51:33 +0900 (Thu, 17 Sep 2009)

  New Revision: 24978

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24978

  Log:
    * thread.c: added rdocs.

  Modified files:
    trunk/thread.c

Index: thread.c
===================================================================
--- thread.c	(revision 24977)
+++ thread.c	(revision 24978)
@@ -143,12 +143,28 @@
 # if THREAD_DEBUG < 0
 static int rb_thread_debug_enabled;
 
+/*
+ *  call-seq:
+ *     Thread.DEBUG     => num
+ *
+ *  Returns the thread debug level.  Available only if compiled with
+ *  THREAD_DEBUG=-1.
+ */
+
 static VALUE
 rb_thread_s_debug(void)
 {
     return INT2NUM(rb_thread_debug_enabled);
 }
 
+/*
+ *  call-seq:
+ *     Thread.DEBUG = num
+ *
+ *  Sets the thread debug level.  Available only if compiled with
+ *  THREAD_DEBUG=-1.
+ */
+
 static VALUE
 rb_thread_s_debug_set(VALUE self, VALUE val)
 {
@@ -503,6 +519,7 @@
     return thval;
 }
 
+/* :nodoc: */
 static VALUE
 thread_s_new(int argc, VALUE *argv, VALUE klass)
 {
@@ -533,6 +550,7 @@
     return thread_create_core(rb_thread_alloc(klass), args, 0);
 }
 
+/* :nodoc: */
 static VALUE
 thread_initialize(VALUE thread, VALUE args)
 {
@@ -1634,6 +1652,13 @@
     return GET_THREAD()->vm->main_thread->self;
 }
 
+/*
+ *  call-seq:
+ *     Thread.main   => thread
+ *
+ *  Returns the main thread.
+ */
+
 static VALUE
 rb_thread_s_main(VALUE klass)
 {
@@ -3852,6 +3877,14 @@
     rb_threadptr_add_event_hook(th, call_trace_func, RUBY_EVENT_ALL, trace);
 }
 
+/*
+ *  call-seq:
+ *     thr.add_trace_func(proc)    => proc
+ *
+ *  Adds _proc_ as a handler for tracing.
+ *  See <code>Thread#set_trace_func</code> and +set_trace_func+.
+ */
+
 static VALUE
 thread_add_trace_func_m(VALUE obj, VALUE trace)
 {
@@ -3861,6 +3894,16 @@
     return trace;
 }
 
+/*
+ *  call-seq:
+ *     thr.set_trace_func(proc)    => proc
+ *     thr.set_trace_func(nil)     => nil
+ *
+ *  Establishes _proc_ on _thr_ as the handler for tracing, or
+ *  disables tracing if the parameter is +nil+.
+ *  See +set_trace_func+.
+ */
+
 static VALUE
 thread_set_trace_func_m(VALUE obj, VALUE trace)
 {
@@ -4000,6 +4043,13 @@
 
 VALUE rb_thread_backtrace(VALUE thval);
 
+/*
+ *  call-seq:
+ *     thr.backtrace    => array
+ *
+ *  Returns the current back trace of the _thr_.
+ */
+
 static VALUE
 rb_thread_backtrace_m(VALUE thval)
 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]