Merge pull request #8 from ms-ati/fix-cond-var-signal-when-no-waiters

Fix ConditionVariable#signal to only post if semaphore has waiters
This commit is contained in:
pmahoney committed 2013-12-27 14:49:04 -08:00
commit 1b1fdbe287
2 files changed
+17 -1

No files matched your search

+3 -1
View File
@@ -16,7 +16,9 @@ module ProcessShared
end
def signal
@sem.post
@internal.synchronize do
@sem.post unless @waiting.read_int.zero?
end
end
def wait(mutex, timeout = nil)