diff --git a/src/jobs.lisp b/src/jobs.lisp index 8a2e077..9252383 100644 --- a/src/jobs.lisp +++ b/src/jobs.lisp @@ -48,7 +48,7 @@ (defun make-job-thread (fun id &optional args) "Create a new thread." (let* ((thread-object (%make-thread :id id)) - (thread (make-thread fun :name (format nil "Thread ~a" id) :args (list thread-object)))) + (thread (make-thread fun :name (format nil "Thread ~a" id) :args (append (list thread-object) args)))) (setf (thread-thread thread-object) thread) thread-object)) @@ -132,7 +132,7 @@ Return t if job has been successfully canceled, nil if it currently running." (let ((thread-id (thread-id thread))) (format t "Finalize thread ~a~%" thread-id) (join-thread (thread-thread thread) :default 'join-error) - (if (and nil (not (thread-termination-requested thread))) + (if (not (thread-termination-requested thread)) ;; If the thread wasn't requested to terminate, something wrong happened, restart a new one (let ((new-thread (make-job-thread #'thread-loop thread-id))) (push-command #'initialize-thread nil new-thread)