diff options
-rw-r--r-- | knots/thread-pool.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/knots/thread-pool.scm b/knots/thread-pool.scm index 9f3dd2d..69010c6 100644 --- a/knots/thread-pool.scm +++ b/knots/thread-pool.scm @@ -151,7 +151,9 @@ from there, or #f if that would be an empty string." thread-pool? (channel thread-pool-channel) (arguments-parameter thread-pool-arguments-parameter) - (proc-vector thread-pool-proc-vector)) + (proc-vector thread-pool-proc-vector) + (default-checkout-timeout + thread-pool-default-checkout-timeout)) (define* (make-thread-pool size #:key @@ -163,7 +165,8 @@ from there, or #f if that would be an empty string." (log-exception? (const #t)) (expire-on-exception? #f) (name "unnamed") - (use-default-io-waiters? #t)) + (use-default-io-waiters? #t) + default-checkout-timeout) "Return a channel used to offload work to a dedicated thread. ARGS are the arguments of the thread pool procedure." (define param @@ -349,11 +352,9 @@ arguments of the thread pool procedure." (define thread-pool-timeout-error? (record-predicate &thread-pool-timeout)) -(define %thread-pool-default-timeout - (make-parameter 30)) - (define* (call-with-thread record proc #:key duration-logger - (timeout (%thread-pool-default-timeout)) + (timeout (thread-pool-default-checkout-timeout + record)) (channel (thread-pool-channel record))) "Send PROC to the thread pool through CHANNEL. Return the result of PROC. If already in the thread pool, call PROC immediately." |