summaryrefslogtreecommitdiff
path: root/test/monitor
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-28 23:01:53 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-29 11:41:10 +0900
commit9eae8cdefba61e9e51feb30a4b98525593169666 (patch)
treeb54d8502f7e7733e48c798e517f7676bf0395a51 /test/monitor
parent983c9ad3f197ab8612c08ea894765b43ed089749 (diff)
Prefer qualified names under Thread
Diffstat (limited to 'test/monitor')
-rw-r--r--test/monitor/test_monitor.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/monitor/test_monitor.rb b/test/monitor/test_monitor.rb
index 0f17d58..3eceee7 100644
--- a/test/monitor/test_monitor.rb
+++ b/test/monitor/test_monitor.rb
@@ -19,7 +19,7 @@ class TestMonitor < Test::Unit::TestCase
def test_enter
ary = []
- queue = Queue.new
+ queue = Thread::Queue.new
th = Thread.start {
queue.pop
@monitor.enter
@@ -83,7 +83,7 @@ class TestMonitor < Test::Unit::TestCase
def test_synchronize
ary = []
- queue = Queue.new
+ queue = Thread::Queue.new
th = Thread.start {
queue.pop
@monitor.synchronize do
@@ -108,7 +108,7 @@ class TestMonitor < Test::Unit::TestCase
def test_killed_thread_in_synchronize
ary = []
- queue = Queue.new
+ queue = Thread::Queue.new
t1 = Thread.start {
queue.pop
@monitor.synchronize {
@@ -136,8 +136,8 @@ class TestMonitor < Test::Unit::TestCase
end
def test_try_enter
- queue1 = Queue.new
- queue2 = Queue.new
+ queue1 = Thread::Queue.new
+ queue2 = Thread::Queue.new
th = Thread.start {
queue1.deq
@monitor.enter
@@ -176,8 +176,8 @@ class TestMonitor < Test::Unit::TestCase
end
def test_mon_locked_and_owned
- queue1 = Queue.new
- queue2 = Queue.new
+ queue1 = Thread::Queue.new
+ queue2 = Thread::Queue.new
th = Thread.start {
@monitor.enter
queue1.enq(nil)
@@ -210,7 +210,7 @@ class TestMonitor < Test::Unit::TestCase
cond = @monitor.new_cond
a = "foo"
- queue1 = Queue.new
+ queue1 = Thread::Queue.new
th = Thread.start do
queue1.deq
@monitor.synchronize do
@@ -262,7 +262,7 @@ class TestMonitor < Test::Unit::TestCase
def test_timedwait
cond = @monitor.new_cond
b = "foo"
- queue2 = Queue.new
+ queue2 = Thread::Queue.new
th = Thread.start do
queue2.deq
@monitor.synchronize do
@@ -282,7 +282,7 @@ class TestMonitor < Test::Unit::TestCase
assert_join_threads([th, th2])
c = "foo"
- queue3 = Queue.new
+ queue3 = Thread::Queue.new
th = Thread.start do
queue3.deq
@monitor.synchronize do
@@ -312,7 +312,7 @@ class TestMonitor < Test::Unit::TestCase
# end
# end
# }
-# queue3 = Queue.new
+# queue3 = Thread::Queue.new
# Thread.start do
# queue3.pop
# @monitor.synchronize do