fix job::wait-for-next-job to properly return the next available job
This commit is contained in:
parent
9a32457848
commit
328879638b
1 changed files with 4 additions and 2 deletions
|
|
@ -11,6 +11,7 @@
|
|||
:thread
|
||||
:containers)
|
||||
(:export :job
|
||||
:job-result
|
||||
:push-job
|
||||
:wait-for-job
|
||||
:cancel-job))
|
||||
|
|
@ -149,7 +150,8 @@ Return t if job has been successfully canceled, nil if it currently running."
|
|||
(condition-wait waitqueue lock)
|
||||
(when (peek job-list)
|
||||
(setf job (dequeue job-list))
|
||||
(setf (job-running job) t)))))
|
||||
(setf (job-running job) t))
|
||||
job)))
|
||||
|
||||
(defun thread-loop (thread)
|
||||
"Run the thread loop.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue