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:
1b218c4
)
mhash: Prepare the GC daemon to run concurrently with other threads.
author
Matt Birkholz
<puck@birchwood-abbey.net>
Sun, 12 Jul 2015 22:10:53 +0000
(15:10 -0700)
committer
Matt Birkholz
<puck@birchwood-abbey.net>
Mon, 17 Aug 2015 23:52:58 +0000
(16:52 -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)))