Release semaphore even in case of error
This commit is contained in:
parent
9daeb78cd7
commit
9fe90a5c54
|
@ -172,9 +172,12 @@
|
||||||
(define (put/bytes^ p cb mt h)
|
(define (put/bytes^ p cb mt h)
|
||||||
(semaphore-wait put-bytes-sema)
|
(semaphore-wait put-bytes-sema)
|
||||||
(thread
|
(thread
|
||||||
(λ ()
|
(lambda ()
|
||||||
(put/bytes p cb mt h)
|
(with-handlers ((values (lambda (e)
|
||||||
(semaphore-post put-bytes-sema))))
|
(semaphore-post put-bytes-sema)
|
||||||
|
(raise e))))
|
||||||
|
(put/bytes p cb mt h)
|
||||||
|
(semaphore-post put-bytes-sema)))))
|
||||||
|
|
||||||
(define (aws-put-file! index absolute-path content-bytes mime-type [headers '()])
|
(define (aws-put-file! index absolute-path content-bytes mime-type [headers '()])
|
||||||
(define relative-path (absolute-path->relative-path absolute-path))
|
(define relative-path (absolute-path->relative-path absolute-path))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user