Add comments about thread safety.

This commit is contained in:
interp 2003-01-25 16:33:50 +00:00
parent f2872877ad
commit e32b78badb
2 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,10 @@
;; sets the value (an option record, see end of file) ;; sets the value (an option record, see end of file)
(define *options* (make-preserved-thread-fluid #f)) (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 ;;; SURFLET-TABLE cache
(define *surflet-table* (make-string-table)) ; path-string is index (define *surflet-table* (make-string-table)) ; path-string is index
(define *surflet-table-lock* (make-lock)) (define *surflet-table-lock* (make-lock))

View File

@ -35,8 +35,9 @@
;; Bindings of POST requests can be read only once, since they are ;; 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 ;; 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 ;; a later GET-BINDINGS call on the same POST request. The requests
;; referenced by a weak pointer. ;; are referenced by a weak pointer. Thread-safe as all threads use
;; the same lock.
(define *POST-bindings-cache* '()) (define *POST-bindings-cache* '())
(define *cache-lock* (make-lock)) (define *cache-lock* (make-lock))