Project

General

Profile

Bug #4480 ยป thread_rdoc_fix.patch

dre3k (Andrei Kulakov), 03/12/2011 08:26 PM

View differences:

thread.c 2011-03-12 13:18:44.416043982 +0200
* either a symbol or a string name. If the specified variable does not exist,
* returns <code>nil</code>.
*
* a = Thread.new { Thread.current["name"] = "A"; Thread.stop }
* b = Thread.new { Thread.current[:name] = "B"; Thread.stop }
* c = Thread.new { Thread.current["name"] = "C"; Thread.stop }
* Thread.list.each {|x| puts "#{x.inspect}: #{x[:name]}" }
* a = Thread.new { Thread.current["name"] = "A" }
* b = Thread.new { Thread.current[:name] = "B" }
* c = Thread.new { Thread.current["name"] = "C" }
*
* Thread.list.each do |thr|
* thr.join unless thr == Thread.main
* puts "#{thr.inspect}: #{thr[:name]}"
* end
*
* <em>produces:</em>
*
* #<Thread:0x401b3b3c sleep>: C
* #<Thread:0x401b3bc8 sleep>: B
* #<Thread:0x401b3c68 sleep>: A
* #<Thread:0x401bdf4c run>:
* #<Thread:0x88bf918 run>:
* #<Thread:0x88b22cc dead>: A
* #<Thread:0x88b2290 dead>: B
* #<Thread:0x88b2254 dead>: C
*/
static VALUE
    (1-1/1)