summaryrefslogtreecommitdiff
path: root/test/thread/test_queue.rb
AgeCommit message (Collapse)Author
2013-03-11* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-10* lib/thread.rb (Queue#push): return self.kosaki
* lib/thread.rb (Queue#clear): ditto. * lib/thread.rb (SizedQueue#push): ditto. * test/thread/test_queue.rb: add tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-10* test/thread/test_queue.rb (TestQueue#test_thr_kill): reducekosaki
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/trunk@39688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01* lib/thread.rb (ConditionVariable): use hash instead of array forkosaki
@waiters. * test/thread/test_queue.rb (test_sized_queue_and_wakeup): remove a test because @waiters no longer have a chance to duplicated. Now it's a hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30* lib/thread.rb (SizedQueue#pop): rewrite by using ConditionVariable.kosaki
* lib/thread.rb (SizedQueue#push): ditto. * lib/thread.rb (SizedQueue#max): ditto. * lib/thread.rb (Queue#pop): ditto. * lib/thread.rb (Queue#push): ditto. * lib/thread.rb (SizedQueue#num_waiting): adopt the above changes. * lib/thread.rb (SizedQueue#initialize): ditto. * lib/thread.rb (Queue#num_waiting): ditto. * lib/thread.rb (Queue#initialize): ditto. * test/thread/test_queue.rb (test_sized_queue_and_wakeup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29envutil.rb: kill child process when timeoutshirosaki
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process before Timeout::Error is raised. rmdir of mktmpdir fails with EACCES if child process is alive on Windows. * test/thread/test_queue.rb (TestQueue): increase timeout. This test takes long time on Windows XP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09* lib/thread.rb (Queue#pop): Fixed double registration issue whenkosaki
mutex.sleep is interrupted. [Bug #5258] [ruby-dev:44448] * lib/thread.rb (SizedQueue#push): ditto. * test/thread/test_queue.rb (test_sized_queue_and_wakeup, test_queue_pop_interrupt, test_sized_queue_pop_interrupt, test_sized_queue_push_interrupt): new tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-23refine message for test_thr_kill.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-23* test/thread/test_queue.rb (test_thr_kill): show the number of loopakr
run when the test failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-22Decrease timeout limit.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-18* test/thread/test_queue.rb (test_thr_kill): extend timeout.nagachika
this test takes a long time at slow machine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14The test added in r34034 needs to run thousands of times.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14Add test for [Bug #5343] [ruby-core:39634]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-03* lib/thread.rb (SizedQueue#max=) raise ArgumentError if max is notnagachika
positive number. patch by Masaki Matsushita. [ruby-dev:44449] [Bug #5259] * test/thread/test_queue.rb (test_sized_queue_initialize, test_sized_queue_assign_max): add tests for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16* test/thread/test_queue.rb (TestQueue#grind): fix typos.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16* lib/thread.rb (Queue#push, #pop, SizedQueue#push, #pop): removemame
code that kicks waiting thread twice, which caused race and deadlock. [ruby-core:25537] * test/thread/test_queue.rb: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e