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

ruby-changes:40370

From: hsbt <ko1@a...>
Date: Wed, 4 Nov 2015 17:33:39 +0900 (JST)
Subject: [ruby-changes:40370] hsbt:r52451 (trunk): * lib/debug.rb: Add documentation for #thread_list_all.

hsbt	2015-11-04 17:33:29 +0900 (Wed, 04 Nov 2015)

  New Revision: 52451

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

  Log:
    * lib/debug.rb: Add documentation for #thread_list_all.
      [Misc #11580][ci skip]

  Modified files:
    trunk/ChangeLog
    trunk/lib/debug.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52450)
+++ ChangeLog	(revision 52451)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov  4 17:33:24 2015  SHIBATA Hiroshi  <hsbt@r...>
+
+	* lib/debug.rb: Add documentation for #thread_list_all.
+	  [Misc #11580][ci skip]
+
 Wed Nov  4 15:45:59 2015  SHIBATA Hiroshi  <hsbt@r...>
 
 	* class.c: fix documentation for rb_define_class{_id}_under.
Index: lib/debug.rb
===================================================================
--- lib/debug.rb	(revision 52450)
+++ lib/debug.rb	(revision 52451)
@@ -1008,6 +1008,29 @@ EOHELP https://github.com/ruby/ruby/blob/trunk/lib/debug.rb#L1008
       @stdout.print "\n"
     end
 
+    # Prints all threads in @thread_list to @stdout. Returns a sorted array of
+    # values from the @thread_list hash.
+    #
+    # While in the debugger you can list all of
+    # the threads with: <b>DEBUGGER__.thread_list_all</b>
+    #
+    #   (rdb:1) DEBUGGER__.thread_list_all
+    #   +1 #<Thread:0x007fb2320c03f0 run> debug_me.rb.rb:3
+    #    2 #<Thread:0x007fb23218a538@debug_me.rb.rb:3 sleep>
+    #    3 #<Thread:0x007fb23218b0f0@debug_me.rb.rb:3 sleep>
+    #   [1, 2, 3]
+    #
+    # Your current thread is indicated by a <b>+</b>
+    #
+    # Additionally you can list all threads with <b>th l</b>
+    #
+    #   (rdb:1) th l
+    #    +1 #<Thread:0x007f99328c0410 run>  debug_me.rb:3
+    #     2 #<Thread:0x007f9932938230@debug_me.rb:3 sleep> debug_me.rb:3
+    #     3 #<Thread:0x007f9932938e10@debug_me.rb:3 sleep> debug_me.rb:3
+    #
+    # See DEBUGGER__ for more usage.
+
     def thread_list_all
       for th in @thread_list.values.sort
         thread_list(th)

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

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