summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-04 08:33:29 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-04 08:33:29 +0000
commit86875c2bcb32084069d35e95fffafde60b69769b (patch)
treee38e405b63653313a589f8e7412c5f3dc7cc5cc3
parent0047ab96cd4de28c4e2d0f41d6e11ec494d86186 (diff)
* lib/debug.rb: Add documentation for #thread_list_all.
[Misc #11580][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/debug.rb23
2 files changed, 28 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bb489ff..1e163af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Nov 4 17:33:24 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * lib/debug.rb: Add documentation for #thread_list_all.
+ [Misc #11580][ci skip]
+
Wed Nov 4 15:45:59 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* class.c: fix documentation for rb_define_class{_id}_under.
diff --git a/lib/debug.rb b/lib/debug.rb
index fcbf849..05614e3 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -1008,6 +1008,29 @@ EOHELP
@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)