diff options
author | Christopher Baines <mail@cbaines.net> | 2025-02-10 15:16:37 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2025-02-10 15:16:37 +0000 |
commit | d597b77fcb4eb1f776e84337d7086e9e7a729abd (patch) | |
tree | 170b5ac31ea6b0ce6bdbe2ac13a98f62a62d8d46 | |
parent | 6c083bdebd96fa6c8f5ee2d28b0c291fd9c6fe72 (diff) | |
download | knots-master.tar knots-master.tar.gz |
Rather than a parameter.
-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." |