diff --git a/scheme/httpd/surflets/surflet-handler.scm b/scheme/httpd/surflets/surflet-handler.scm index 502cc32..8343fe1 100644 --- a/scheme/httpd/surflets/surflet-handler.scm +++ b/scheme/httpd/surflets/surflet-handler.scm @@ -13,6 +13,10 @@ ;; sets the value (an option record, see end of file) (define *options* (make-preserved-thread-fluid #f)) +;;; TABLES are thread safe as they all use the same lock and different +;;; keys for the hash (There may be performance reasons to change +;;; this, though). + ;;; SURFLET-TABLE cache (define *surflet-table* (make-string-table)) ; path-string is index (define *surflet-table-lock* (make-lock)) diff --git a/scheme/httpd/surflets/surflets.scm b/scheme/httpd/surflets/surflets.scm index 5676f17..6e65770 100644 --- a/scheme/httpd/surflets/surflets.scm +++ b/scheme/httpd/surflets/surflets.scm @@ -35,8 +35,9 @@ ;; Bindings of POST requests can be read only once, since they are ;; read from an input port. So we have to cache them, for the case of -;; a later GET-BINDINGS call on the same POST request. The request are -;; referenced by a weak pointer. +;; a later GET-BINDINGS call on the same POST request. The requests +;; are referenced by a weak pointer. Thread-safe as all threads use +;; the same lock. (define *POST-bindings-cache* '()) (define *cache-lock* (make-lock))