Ignore:
Timestamp:
Nov 25, 2008, 9:03:17 AM (11 years ago)
Author:
gb
Message:

Serialize MAYBE-MAP-OBJC-CLASSES. It might be possible to be less
restrictive here, but we're already doing an ff-call to get the
class count ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/objc-bridge/objc-support.lisp

    r10959 r11427  
    8989       (install-foreign-objc-class class lookup-in-database-p))))
    9090
    91 (let* ((nclasses 0))
     91(let* ((nclasses 0)
     92       (lock (make-lock)))
    9293  (declare (fixnum nclasses))
    9394  (defun maybe-map-objc-classes (&optional use-db)
    94     (let* ((new (count-objc-classes)))
    95       (declare (fixnum new))
    96     (unless (= nclasses new)
    97       (setq nclasses new)
    98       (map-objc-classes use-db)
    99       t)))
     95    (with-lock-grabbed (lock)
     96      (let* ((new (count-objc-classes)))
     97        (declare (fixnum new))
     98        (unless (= nclasses new)
     99          (setq nclasses new)
     100          (map-objc-classes use-db))
     101        t)))
    100102  (defun reset-objc-class-count ()
    101     (setq nclasses 0)))
     103    (with-lock-grabbed (lock)
     104      (setq nclasses 0))))
    102105
    103106(register-objc-class-decls)
Note: See TracChangeset for help on using the changeset viewer.