From 5c3d1dc8ea8de31d43c9e3783c193ac1e1a993f1 Mon Sep 17 00:00:00 2001 From: David Botton Date: Wed, 4 Sep 2024 22:54:31 -0400 Subject: [PATCH] remove mutex not needed since hash synchronized --- source/clog-base.lisp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/source/clog-base.lisp b/source/clog-base.lisp index c47fc05..09fcadb 100644 --- a/source/clog-base.lisp +++ b/source/clog-base.lisp @@ -37,10 +37,7 @@ See macro with-connection-cache.") :initarg :html-id) (parent :accessor parent - :initform nil) - (connection-data-mutex - :reader connection-data-mutex - :initform (bordeaux-threads:make-lock))) + :initform nil)) (:documentation "CLOG objects (clog-obj) encapsulate the connection between lisp and an HTML DOM element.")) @@ -75,13 +72,6 @@ parent if was set or nil. This is not per se the parent in the DOM.")) (defgeneric html-id (clog-obj) (:documentation "Internal html-id of clog-obj. (Internal)")) -;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; connection-data-mutex ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(defgeneric connection-data-mutex (clog-obj) - (:documentation "Reader for connection-data thread lock. (Private)")) - ;;;;;;;;;;;;;;;;;;; ;; make-clog-obj ;; ;;;;;;;;;;;;;;;;;;; @@ -517,9 +507,8 @@ The following default keys are set: (:documentation "Set connection-data item-name with value.")) (defmethod (setf connection-data-item) (value (obj clog-obj) item-name) - (bordeaux-threads:with-lock-held ((connection-data-mutex obj)) - (ignore-errors - (setf (gethash item-name (connection-data obj)) value))) + (ignore-errors + (setf (gethash item-name (connection-data obj)) value)) value) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -530,9 +519,8 @@ The following default keys are set: (:documentation "Remove item-name from connection-data.")) (defmethod remove-connection-data-item ((obj clog-obj) item-name) - (bordeaux-threads:with-lock-held ((connection-data-mutex obj)) - (ignore-errors - (remhash item-name (connection-data obj))))) + (ignore-errors + (remhash item-name (connection-data obj)))) ;;;;;;;;;;;;;;;;;;;;; ;; connection-body ;;