projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
549014b
)
mhash: Assume GC daemon must lock out other threads.
author
Matt Birkholz
<puck@birchwood-abbey.net>
Fri, 10 Jul 2015 02:17:10 +0000
(19:17 -0700)
committer
Matt Birkholz
<puck@birchwood-abbey.net>
Fri, 10 Jul 2015 02:17:10 +0000
(19:17 -0700)
src/mhash/mhash.scm
patch
|
blob
|
history
diff --git
a/src/mhash/mhash.scm
b/src/mhash/mhash.scm
index fc0da45a467288c516567841912a4e9a232b297c..740123e086579c5bf2a03bbee63cfdfddd92170e 100644
(file)
--- a/
src/mhash/mhash.scm
+++ b/
src/mhash/mhash.scm
@@
-115,10
+115,13
@@
USA.
(loop next prev)))))))
(define (cleanup-mhash-contexts)
- (if (not (thread-mutex-owner mhash-contexts-mutex))
- (begin
- (cleanup-contexts)
- (cleanup-hmac-contexts))))
+ (with-thread-mutex-try-lock
+ mhash-contexts-mutex
+ (lambda ()
+ (cleanup-contexts)
+ (cleanup-hmac-contexts))
+ (lambda ()
+ unspecific)))
(define (mhash-name->id name procedure)
(let ((n (vector-length mhash-algorithm-names)))