[Eager-future-devel] Hard-limit added to thread pool
Bill St. Clair
wws at clozure.com
Tue Feb 9 14:39:25 UTC 2010
I decided I wanted a way to put an upper-limit on the number of threads
created by the eager-future thread pool. Very simple change. Please
integrate it.
-Bill St. Clair
wws at clozure.com
$ darcs diff
diff -rN old-eager-future/package.lisp new-eager-future/package.lisp
5c5,6
< #:%thread-pool-soft-limit)
---
> #:%thread-pool-soft-limit
> #:%thread-pool-hard-limit)
diff -rN old-eager-future/threads.lisp new-eager-future/threads.lisp
6a7
> (hard-limit :accessor hard-limit :initform nil)
13a15
> (define-symbol-macro %thread-pool-hard-limit (hard-limit *thread-pool*))
42c44,46
< (if (= (free-thread-counter thread-pool) (length (tasks thread-pool)))
---
> (if (and (= (free-thread-counter thread-pool) (length (tasks
thread-pool)))
> (or (null (hard-limit thread-pool))
> (< (length (threads thread-pool)) (hard-limit
thread-pool))))
More information about the eager-future-devel
mailing list