Add call-with-default-io-waiters
As this is useful when starting threads from a fibers context.
This commit is contained in:
parent
55af7c82e8
commit
2d7100e75d
1 changed files with 9 additions and 0 deletions
|
|
@ -52,6 +52,7 @@
|
|||
with-resource-from-pool
|
||||
resource-pool-stats
|
||||
|
||||
call-with-default-io-waiters
|
||||
make-worker-thread-channel
|
||||
%worker-thread-default-timeout
|
||||
call-with-worker-thread
|
||||
|
|
@ -497,6 +498,14 @@ available. Return the resource once PROC has returned."
|
|||
(raise-exception
|
||||
(make-resource-pool-timeout-error))))))
|
||||
|
||||
(define (call-with-default-io-waiters thunk)
|
||||
(parameterize
|
||||
((current-read-waiter (@@ (ice-9 suspendable-ports)
|
||||
default-read-waiter))
|
||||
(current-write-waiter (@@ (ice-9 suspendable-ports)
|
||||
default-write-waiter)))
|
||||
(thunk)))
|
||||
|
||||
(define %worker-thread-args
|
||||
(make-parameter #f))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue