From: Matt Birkholz Date: Sun, 8 Sep 2013 19:32:30 +0000 (-0700) Subject: gdbm: Add event:after-restart receiver reset-open-gdbfs. X-Git-Tag: release-9.2.0~119 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6d326b722fc37367272717c2e2667f99965e3c76;p=mit-scheme.git gdbm: Add event:after-restart receiver reset-open-gdbfs. --- diff --git a/src/gdbm/gdbm.scm b/src/gdbm/gdbm.scm index a799b119f..6eee58755 100644 --- a/src/gdbm/gdbm.scm +++ b/src/gdbm/gdbm.scm @@ -363,7 +363,12 @@ USA. (alien-null! args))) (loop next prev)))))))) +(define (reset-open-gdbfs) + (for-each (lambda (weak) (alien-null! (weak-cdr weak))) open-gdbfs) + (set! open-gdbfs '())) + (define (initialize-package!) (set! open-gdbfs-mutex (make-thread-mutex)) (set! open-gdbfs '()) - (add-gc-daemon! cleanup-open-gdbfs)) \ No newline at end of file + (add-gc-daemon! cleanup-open-gdbfs) + (add-event-receiver! event:after-restart reset-open-gdbfs)) \ No newline at end of file