Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
sbcl won't finalize until the thread is done?
(defclass finalize-test () ())
(defmethod initialize-instance ((instance finalize-test) &key &allow-other-keys)
(bt:make-thread (lambda () (sleep 300)))
(tg:finalize instance
(lambda ()
(format t "I am all done.~%"))))
(make-instance 'finalize-test)
(cl-user::gc :full t)
;; Same problem:
(defclass finalize-test () ())
(defun make-my-thread ()
(bt:make-thread (lambda () (sleep 300))))
(defmethod initialize-instance ((instance finalize-test) &key &allow-other-keys)
(make-my-thread)
(tg:finalize instance
(lambda ()
(format t "I am all done.~%"))))
(make-instance 'finalize-test)
(cl-user::gc :full t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.