Changeset 422


Ignore:
Timestamp:
Jan 30, 2004, 11:34:52 AM (21 years ago)
Author:
Gary Byers
Message:

Lock on *TERMINATION-POPULATION* access.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-lisp-threads.lisp

    r252 r422  
    11891189  (%cons-terminatable-alist))
    11901190
     1191(defvar *termination-population-lock* (make-lock))
     1192
    11911193
    11921194(defvar *enable-automatic-termination* t)
     
    11951197  (let ((new-cell (list (cons object function)))
    11961198        (population *termination-population*))
    1197     (without-interrupts
     1199    (with-lock-grabbed (*termination-population-lock*)
    11981200     (setf (cdr new-cell) (population-data population)
    11991201           (population-data population) new-cell))
     
    12071209        (population *termination-population*))
    12081210    (loop
    1209       (without-interrupts
     1211      (with-lock-grabbed (*termination-population-lock*)
    12101212       (let ((list (population-termination-list population)))
    12111213         (unless list (return))
     
    12221224                  (setq found-it? t))))
    12231225      (declare (dynamic-extent #'test))
    1224       (without-interrupts
     1226      (with-lock-grabbed (*termination-population-lock*)
    12251227       (setf (population-data *termination-population*)
    12261228             (delete object (population-data *termination-population*)
     
    12301232
    12311233(defun termination-function (object)
    1232   (cdr (assq object (population-data *termination-population*))))
     1234  (with-lock-grabbed (*termination-population-lock*)
     1235    (cdr (assq object (population-data *termination-population*)))))
    12331236
    12341237(defun do-automatic-termination ()
Note: See TracChangeset for help on using the changeset viewer.