Commit 879b67bf authored by Pascal Costanza's avatar Pascal Costanza
Browse files

With-hash-table-locked didn't exist yet in LispWorks 5.0, so I added a regular...

With-hash-table-locked didn't exist yet in LispWorks 5.0, so I added a regular lock for that version.

Ignore-this: 5a217ed6f08ddef7de47d5ea05b49adb

darcs-hash:b3ba1a1cd00e81b17cda333f3aeb937918894a6f
parent 5b341a04
......@@ -258,6 +258,10 @@
(defvar *eql-specializers* (make-hash-table :weak-kind :value))
#+lispworks5.0
(defvar *eql-specializers-lock* (mp:make-lock))
#-lispworks5.0
(defun intern-eql-specializer* (object)
(or (gethash object *eql-specializers*)
(with-hash-table-locked *eql-specializers*
......@@ -265,6 +269,14 @@
(setf (gethash object *eql-specializers*)
(make-instance 'eql-specializer* 'eso object))))))
#+lispworks5.0
(defun intern-eql-specializer* (object)
(or (gethash object *eql-specializers*)
(mp:with-lock (*eql-specializers-lock*)
(or (gethash object *eql-specializers*)
(setf (gethash object *eql-specializers*)
(make-instance 'eql-specializer* 'eso object))))))
(cl:defmethod add-direct-method ((specializer eql-specializer*) (method method))
(pushnew method (es-direct-methods specializer)))
......
......@@ -16,7 +16,7 @@
#+(or cmu mcl) (:shadow #:typep subtypep)
#+lispworks5
#+lispworks5.1
(:import-from #:system #:with-hash-table-locked)
#+lispworks6
(:import-from #:hcl #:with-hash-table-locked)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment