From 6d326b722fc37367272717c2e2667f99965e3c76 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 8 Sep 2013 12:32:30 -0700 Subject: [PATCH] gdbm: Add event:after-restart receiver reset-open-gdbfs. --- src/gdbm/gdbm.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.25.1