Wait for threads to close properly

This commit is contained in:
Renaud Casenave-Péré 2015-12-05 11:44:25 +01:00
parent a2806bc83a
commit 1deb06a92f

View file

@ -146,8 +146,12 @@
(defun finalize ()
"Finalize the jobs module."
(format t "Finalize Job system~%")
(update 0.0)
(loop-with-progress "Finalize Job system"
while (> (length *thread-list*) 0)
do (progn
(update 0.0)
(sleep 0.1)
progress-step))
(assert (eq (length *thread-list*) 0))
(loop as job = (dequeue *job-queue*)
while job