mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* test/ruby/test_io.rb: New test that open(fifo) doesn't block other
threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f662d31b6b
commit
2eb3c2c528
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Apr 12 13:54:05 2015 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* test/ruby/test_io.rb: New test that open(fifo) doesn't block other
|
||||||
|
threads.
|
||||||
|
|
||||||
Sun Apr 12 13:52:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
Sun Apr 12 13:52:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
* ext/coverage/coverage.c: Remove extension from require argument.
|
* ext/coverage/coverage.c: Remove extension from require argument.
|
||||||
|
|
|
@ -3178,4 +3178,18 @@ End
|
||||||
assert_raise(IOError) { io.close }
|
assert_raise(IOError) { io.close }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_open_fifo_does_not_block_other_threads
|
||||||
|
mkcdtmpdir {
|
||||||
|
assert(system("mkfifo", "fifo"), "mkfifo fails")
|
||||||
|
assert_separately([], <<-'EOS')
|
||||||
|
t = Thread.new {
|
||||||
|
open("fifo") {}
|
||||||
|
}
|
||||||
|
sleep 0.1 until t.status == "sleep"
|
||||||
|
sleep 0.1
|
||||||
|
assert(true)
|
||||||
|
EOS
|
||||||
|
}
|
||||||
|
end if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue