зеркало из https://github.com/github/ruby.git
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
@timeout_info's "can't add a new key into hash during iteration". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
bfdccf09c7
Коммит
3c491a92f6
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Mar 31 21:39:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
|
||||||
|
@timeout_info's "can't add a new key into hash during iteration".
|
||||||
|
|
||||||
Sat Mar 31 14:22:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Mar 31 14:22:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* hash.c (hash_default_value): extract from rb_hash_aref(), to be
|
* hash.c (hash_default_value): extract from rb_hash_aref(), to be
|
||||||
|
|
|
@ -175,7 +175,7 @@ module WEBrick
|
||||||
Thread.start{
|
Thread.start{
|
||||||
while true
|
while true
|
||||||
now = Time.now
|
now = Time.now
|
||||||
@timeout_info.each{|thread, ary|
|
@timeout_info.dup.each{|thread, ary|
|
||||||
ary.dup.each{|info|
|
ary.dup.each{|info|
|
||||||
time, exception = *info
|
time, exception = *info
|
||||||
interrupt(thread, info.object_id, exception) if time < now
|
interrupt(thread, info.object_id, exception) if time < now
|
||||||
|
|
Загрузка…
Ссылка в новой задаче