chickadee » posix-semaphore » with-sem/timed

with-sem/timed semaphore seconds nano-seconds body-success body-failprocedure

Macro that uses dynamic-wind to ensure that the semaphore is properly posted regardless of the outcome of `body-success` and `body-fail`. `body-success` is called if the semaphore was able to be decremented in `seconds + nano-seconds`, otherwise `body-fail` is called.