1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 39688: [Backport #8065]

* test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce
	  iterations from 2000 to 250. When running on uniprocessor
	  systems, every th.kill needs TIME_QUANTUM_USEC time (i.e.
	  100msec on posix systems). Because, "r.read 1" is 3 steps
	  operations that 1) release GVL 2) read 3) acquire gvl and
	  (1) invoke context switch to main thread. and then, main
	  thread's th.kill resume (1), but not (2). Thus read interrupt
	  need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec
	  = 300.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2013-03-11 15:57:50 +00:00
parent 6901ebcb7c
commit 91e371802f
3 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,15 @@
Tue Mar 12 00:56:19 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce
iterations from 2000 to 250. When running on uniprocessor
systems, every th.kill needs TIME_QUANTUM_USEC time (i.e.
100msec on posix systems). Because, "r.read 1" is 3 steps
operations that 1) release GVL 2) read 3) acquire gvl and
(1) invoke context switch to main thread. and then, main
thread's th.kill resume (1), but not (2). Thus read interrupt
need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec
= 300.
Tue Mar 12 00:53:34 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* process.c (setup_communication_pipe): remove unused function.

View file

@ -85,7 +85,7 @@ class TestQueue < Test::Unit::TestCase
bug5343 = '[ruby-core:39634]'
Dir.mktmpdir {|d|
timeout = 30
total_count = 2000
total_count = 250
begin
assert_normal_exit(<<-"_eom", bug5343, {:timeout => timeout, :chdir=>d})
require "thread"
@ -98,7 +98,8 @@ class TestQueue < Test::Unit::TestCase
r.read 1
}
queue.pop
th.kill.join
th.kill
th.join
end
_eom
rescue Timeout::Error

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2013-03-12"
#define RUBY_PATCHLEVEL 56
#define RUBY_PATCHLEVEL 57
#define RUBY_RELEASE_YEAR 2013
#define RUBY_RELEASE_MONTH 3