From b9cbc5e56b3b5330a628fd9a013aed25904f6d84 Mon Sep 17 00:00:00 2001 From: Vladimir Sedach <vsedach@gmail.com> Date: Thu, 2 Dec 2010 03:04:55 -0500 Subject: [PATCH] In yield, made wait-list notification happen after other-thread computation is aborted. --- future.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/future.lisp b/future.lisp index efa22fa..4f8908c 100644 --- a/future.lisp +++ b/future.lisp @@ -30,12 +30,12 @@ computation of the future)." (if (slot-boundp future 'values) (return-from force nil) (setf (%values future) values))) - (dolist (x (wait-list future)) - (with-lock-held ((car x)) - (condition-notify (cdr x)))) (with-slots (computing-thread) future (unless (eq computing-thread (current-thread)) (abort-scheduled-future-task computing-thread (future-id future))) + (dolist (x (wait-list future)) + (with-lock-held ((car x)) + (condition-notify (cdr x)))) (setf computing-thread nil (wait-list future) nil (task future) nil -- GitLab