remove mutex not needed since hash synchronized

This commit is contained in:
David Botton 2024-09-04 22:54:31 -04:00
parent 1465fded4e
commit 5c3d1dc8ea

View file

@ -37,10 +37,7 @@ See macro with-connection-cache.")
:initarg :html-id) :initarg :html-id)
(parent (parent
:accessor parent :accessor parent
:initform nil) :initform nil))
(connection-data-mutex
:reader connection-data-mutex
:initform (bordeaux-threads:make-lock)))
(:documentation "CLOG objects (clog-obj) encapsulate the connection between (:documentation "CLOG objects (clog-obj) encapsulate the connection between
lisp and an HTML DOM element.")) 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) (defgeneric html-id (clog-obj)
(:documentation "Internal html-id of clog-obj. (Internal)")) (: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 ;; ;; make-clog-obj ;;
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;
@ -517,9 +507,8 @@ The following default keys are set:
(:documentation "Set connection-data item-name with value.")) (:documentation "Set connection-data item-name with value."))
(defmethod (setf connection-data-item) (value (obj clog-obj) item-name) (defmethod (setf connection-data-item) (value (obj clog-obj) item-name)
(bordeaux-threads:with-lock-held ((connection-data-mutex obj)) (ignore-errors
(ignore-errors (setf (gethash item-name (connection-data obj)) value))
(setf (gethash item-name (connection-data obj)) value)))
value) value)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -530,9 +519,8 @@ The following default keys are set:
(:documentation "Remove item-name from connection-data.")) (:documentation "Remove item-name from connection-data."))
(defmethod remove-connection-data-item ((obj clog-obj) item-name) (defmethod remove-connection-data-item ((obj clog-obj) item-name)
(bordeaux-threads:with-lock-held ((connection-data-mutex obj)) (ignore-errors
(ignore-errors (remhash item-name (connection-data obj))))
(remhash item-name (connection-data obj)))))
;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;
;; connection-body ;; ;; connection-body ;;