Skip to content
Browse files

check for empty thread pool *after* enqueueing a task (prevents situa…

…tion where pool is empty while there are still tasks waiting)"
  • Loading branch information...
1 parent d664685 commit 889f19cbdb89c33886e8cd8f965e68d9fd233fa4 @marijnh committed Jun 4, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 pcall.lisp
4 pcall.lisp
@@ -4,10 +4,10 @@
"Call a thunk in parallel. Returns a task that can be joined. When
an exclusive is given, the task will only run when no other tasks with
that exclusive are running."
- (unless *thread-pool*
- (audit-thread-pool))
(let ((task (make-instance 'task :thunk thunk)))
(queue-push task *task-queue*)
+ (unless *thread-pool*
+ (audit-thread-pool))
(defmacro pexec (&body body)

0 comments on commit 889f19c

Please sign in to comment.
Something went wrong with that request. Please try again.