Changeset 3383

Show
Ignore:
Timestamp:
06/30/08 12:47:55 (6 months ago)
Author:
ksprotte
Message:

removed *make-object-lock* and replaced it with store-guard

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bknr/datastore/src/data/object.lisp

    r3144 r3383  
    565565       collect value)) 
    566566 
    567 ;;; In order to avoid concurrency problems, we lock creation of 
    568 ;;; objects early.  Otherwise, we may run into the situation that an 
    569 ;;; object id is used for two objects. 
    570  
    571 (defvar *make-object-lock* (mp-make-lock)) 
    572  
    573567;;; create object transaction, should not be called from user code, as 
    574568;;; we have to give it a unique id in the initargs. After the object 
     
    592586 
    593587(defun make-object (class-name &rest initargs) 
    594   "Make a persistent object of class named CLASS-NAME. Calls MAKE-INSTANCE with INITARGS." 
    595   (mp-with-recursive-lock-held (*make-object-lock*
     588  "Make a persistent object of class named CLASS-NAME. Calls MAKE-INSTANCE with INITARGS."   
     589  (with-store-guard (
    596590    (execute (make-instance 'transaction 
    597591                            :function-symbol 'tx-make-object