summaryrefslogtreecommitdiff
path: root/test/monitor/test_monitor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/monitor/test_monitor.rb')
-rw-r--r--test/monitor/test_monitor.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/monitor/test_monitor.rb b/test/monitor/test_monitor.rb
index 734b639d4c..0f17d58f71 100644
--- a/test/monitor/test_monitor.rb
+++ b/test/monitor/test_monitor.rb
@@ -10,6 +10,13 @@ class TestMonitor < Test::Unit::TestCase
@monitor = Monitor.new
end
+ def test_enter_in_different_fibers
+ @monitor.enter
+ Fiber.new {
+ assert_equal false, @monitor.try_enter
+ }.resume
+ end
+
def test_enter
ary = []
queue = Queue.new