2 require 'yarvtest/yarvtest'
4 class TestThread < YarvTestBase
18 def test_create_many_threads1
32 def test_create_many_threads2
45 def test_create_many_threads3
56 def test_create_many_threads4
59 Thread.new{loop{Thread.pass}}
96 t.raise # raise to exited thread
135 Thread.current[:a] = 1
137 Thread.current[:a] = 10
140 }.value + Thread.current[:a]
144 def test_thread_group
146 ptg = Thread.current.group
148 ctg = Thread.current.group
149 [ctg.class, ctg == ptg]
153 thg = ThreadGroup.new
156 thg.add Thread.current
160 [thg.list.size, ThreadGroup::Default.list.size]
164 def test_thread_local_svar
174 [$a == $d, $b, $c != $d]