Add BinarySemaphore (error checking semaphore with max value 1).

This commit is contained in:
Patrick Mahoney committed 2011-12-17 10:15:22 -06:00
1 parent 0f00a7d444
commit 7d71937bf7
2 files changed
+61

No files matched your search

@@ -0,0 +1,13 @@
require 'spec_helper'
require 'process_shared/binary_semaphore'
module ProcessShared
describe BinarySemaphore do
it 'raises exception with double post' do
BinarySemaphore.open(0) do |sem|
sem.post
proc { sem.post }.must_raise(ProcessError)
end
end
end
end