]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/concurrency/semaphores/semaphores.factor
continuations[-docs]: add the finally word
[factor.git] / basis / concurrency / semaphores / semaphores.factor
index 392b7557d69e21a5e3f4198986e4f55b0256c1fa..11196b4f499933bf758e32b3ffd2b201952810ab 100644 (file)
@@ -32,7 +32,7 @@ M: negative-count-semaphore summary
 
 :: with-semaphore-timeout ( semaphore timeout quot -- )
     semaphore timeout acquire-timeout
-    quot [ semaphore release ] [ ] cleanup ; inline
+    quot [ semaphore release ] finally ; inline
 
 : with-semaphore ( semaphore quot -- )
-    swap dup acquire '[ _ release ] [ ] cleanup ; inline
+    swap dup acquire '[ _ release ] finally ; inline