зеркало из https://github.com/github/ruby.git
* benchmark/bm_vm4_pass_flood.rb: new benchmark for GVL fairness.
* benchmark/bm_vm4_alive_check1.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
556cd0de07
Коммит
7f6e8625bb
|
@ -1,3 +1,8 @@
|
|||
Wed Jun 15 03:52:50 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* benchmark/bm_vm4_pass_flood.rb: new benchmark for GVL fairness.
|
||||
* benchmark/bm_vm4_alive_check1.rb: ditto.
|
||||
|
||||
Wed Jun 15 01:27:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread_pthread.c (gvl_yield): fix live lock issue on 1-2 cpus
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
5000.times{
|
||||
t = Thread.new{}
|
||||
while t.alive?
|
||||
Thread.pass
|
||||
end
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
1000.times{
|
||||
Thread.new{loop{Thread.pass}}
|
||||
}
|
||||
|
||||
i=0
|
||||
while i<10000
|
||||
i += 1
|
||||
end
|
Загрузка…
Ссылка в новой задаче