Comment 5 for bug 1173996

Revision history for this message
il71 (il71) wrote :

You are right, I should have used synchronization:

(require :bordeaux-threads)

(defparameter *x* 0)

(defun print-x ()
  (print *x*))

(bt:join-thread
  (let ((*x* 1))
    (bt:make-thread
      #'(lambda ()
          (print-x)
          (let ((*x* 2))
            (print-x))))))

My bad.