sem_lock |
This template class allows a
semaphore to be auto-locked within a scope. The lock must be instantiated on a
synchronization object that understands lock() and unlock()
. When an os_sem_lock is constructed with a
reference to a semaphore, the os_sem_lock calls lock()
on the associated semaphore. When an os_sem_lock is
destroyed, it calls unlock() on the associated
semaphore. An os_sem_lock is merely a helper class
and does not own its semaphore.
Throws: any exception thrown by semaphore
.lock() .
Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only.