about summary refs log tree commit homepage
path: root/projects/fastthread/test/test_condvar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'projects/fastthread/test/test_condvar.rb')
-rw-r--r--projects/fastthread/test/test_condvar.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/projects/fastthread/test/test_condvar.rb b/projects/fastthread/test/test_condvar.rb
deleted file mode 100644
index 3b6b948..0000000
--- a/projects/fastthread/test/test_condvar.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require 'test/unit'
-require 'thread'
-if RUBY_PLATFORM != "java"
-  $:.unshift File.expand_path( File.join( File.dirname( __FILE__ ), "../ext/fastthread" ) )
-  require 'fastthread'
-end
-
-class TestCondVar < Test::Unit::TestCase
-  def test_signal
-    s = ""
-    m = Mutex.new
-    cv = ConditionVariable.new
-    ready = false
-
-    t = Thread.new do
-      nil until ( Thread.pass ; m.synchronize { ready } )
-      m.synchronize { s << "b" }
-      cv.signal
-    end
-
-    m.synchronize do
-      s << "a"
-      ready = true
-      cv.wait m
-      assert m.locked?
-      s << "c"
-    end
-
-    t.join
-
-    assert_equal "abc", s
-  end
-end
-