sunet/scheme/httpd/surflets/with-locks.scm

11 lines
157 B
Scheme
Raw Normal View History

;; From sunterlib
(define (with-lock lock thunk)
(dynamic-wind
(lambda ()
(obtain-lock lock))
thunk
(lambda ()
(release-lock lock))))