From 2dd44622b2c1457a13956378d66a24eabcf1f794 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 13 Jun 2004 04:14:22 +0000 Subject: [PATCH] Must lock table during REHASH-TABLE!. --- v7/src/runtime/hashtb.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/v7/src/runtime/hashtb.scm b/v7/src/runtime/hashtb.scm index c25354c32..e6b1c2a47 100644 --- a/v7/src/runtime/hashtb.scm +++ b/v7/src/runtime/hashtb.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: hashtb.scm,v 1.30 2004/06/12 03:46:22 cph Exp $ +$Id: hashtb.scm,v 1.31 2004/06/13 04:14:22 cph Exp $ Copyright 1990,1991,1993,1994,1995,2003 Massachusetts Institute of Technology Copyright 2004 Massachusetts Institute of Technology @@ -609,10 +609,12 @@ USA. hash))))) (define (rehash-table! table) - (let ((entries (extract-table-entries! table))) - (set-table-needs-rehash?! table #f) - ((table-type-method:rehash! (table-type table)) table entries)) - (maybe-shrink-table! table)) + (with-table-locked! table + (lambda () + (let ((entries (extract-table-entries! table))) + (set-table-needs-rehash?! table #f) + ((table-type-method:rehash! (table-type table)) table entries)) + (maybe-shrink-table! table)))) (define (extract-table-entries! table) (let ((buckets (table-buckets table))) -- 2.25.1