mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
8c84716b24
* benchmark/bm_require_thread.rb: new benchmark for conflicting require vs thread. like [Bug #11559] * prepare_require.rb: new file for preparing above tests. * prepare_require.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
15 lines
189 B
Ruby
15 lines
189 B
Ruby
$:.push File.join(File.dirname(__FILE__), "bm_require.data")
|
|
|
|
i=0
|
|
t = Thread.new do
|
|
while true
|
|
i = i+1 # dummy loop
|
|
end
|
|
end
|
|
|
|
1.upto(100) do |i|
|
|
require "c#{i}"
|
|
end
|
|
|
|
$:.pop
|
|
t.kill
|