I am sure I'm doing something silly here, but this won't call the finalizer until the thread is done (or at least it correlates strongly...).  Currently x86_64 1.1.12:



    (defclass finalize-test () ())
    (defun make-my-thread ()
      (bt:make-thread (lambda () (sleep 300))))
    (defmethod initialize-instance ((instance finalize-test) &key &allow-other-keys)
      (tg:finalize instance
                   (lambda ()
                     (format t "I am all done.~%"))))
    (make-instance 'finalize-test)
    (cl-user::gc :full t)

Calling GC repeatedly doesn't seem to do anything until I kill the thread or wait for it to end.

Ryan Pavlik <rpavlik@gmail.com> | https://github.com/rpav