Add posix-y compatibility extension class over Mach::Semaphore.

This commit is contained in:
Patrick Mahoney committed 2012-02-01 21:36:15 -06:00
1 parent 680527cbab
commit 8158666e90
3 files changed
+133 -2

No files matched your search

+1 -2
View File
@@ -98,14 +98,13 @@ module ProcessShared
it 'returns after waiting if another processes posts' do
Semaphore.open(0) do |sem|
start = Time.now.to_f
pid = fork do
sleep 0.01
sem.post
Kernel.exit!
end
start = Time.now.to_f
sem.try_wait(0.1)
(Time.now.to_f - start).must be_lt(0.1)