Add documentation for lots of the "undocumented" bits
All checks were successful
/ test (push) Successful in 6s
All checks were successful
/ test (push) Successful in 6s
In the Guile Documenta generated documentation.
This commit is contained in:
parent
d282841a78
commit
d0ff89023b
8 changed files with 140 additions and 5 deletions
|
|
@ -160,6 +160,14 @@ from there, or #f if that would be an empty string."
|
|||
thread-pool?
|
||||
(resource-pool thread-pool-resource-pool)
|
||||
(arguments-parameter thread-pool-arguments-parameter-accessor))
|
||||
(set-procedure-property!
|
||||
(macro-transformer (module-ref (current-module) 'thread-pool?))
|
||||
'documentation
|
||||
"Return @code{#t} if OBJ is a @code{<thread-pool>}.")
|
||||
(set-procedure-property!
|
||||
(macro-transformer (module-ref (current-module) 'thread-pool-resource-pool))
|
||||
'documentation
|
||||
"Return the underlying resource pool of the thread pool.")
|
||||
|
||||
(define-record-type <fixed-size-thread-pool>
|
||||
(fixed-size-thread-pool channel arguments-parameter current-procedures
|
||||
|
|
@ -170,15 +178,29 @@ from there, or #f if that would be an empty string."
|
|||
(current-procedures fixed-size-thread-pool-current-procedures)
|
||||
(default-checkout-timeout fixed-size-thread-pool-default-checkout-timeout)
|
||||
(threads fixed-size-thread-pool-threads))
|
||||
(set-procedure-property!
|
||||
(macro-transformer (module-ref (current-module) 'fixed-size-thread-pool?))
|
||||
'documentation
|
||||
"Return @code{#t} if OBJ is a @code{<fixed-size-thread-pool>}.")
|
||||
(set-procedure-property!
|
||||
(macro-transformer (module-ref (current-module) 'fixed-size-thread-pool-channel))
|
||||
'documentation
|
||||
"Return the channel of the fixed-size thread pool.")
|
||||
(set-procedure-property!
|
||||
(macro-transformer (module-ref (current-module) 'fixed-size-thread-pool-current-procedures))
|
||||
'documentation
|
||||
"Return the current procedures vector of the fixed-size thread pool.")
|
||||
|
||||
;; Since both thread pool records have this field, use a procedure
|
||||
;; than handles the appropriate accessor
|
||||
(define (thread-pool-arguments-parameter pool)
|
||||
"Return the arguments parameter for POOL, dispatching on pool type."
|
||||
(if (fixed-size-thread-pool? pool)
|
||||
(fixed-size-thread-pool-arguments-parameter pool)
|
||||
(thread-pool-arguments-parameter-accessor pool)))
|
||||
|
||||
(define (thread-pool-default-checkout-timeout pool)
|
||||
"Return the default checkout timeout for POOL."
|
||||
(if (fixed-size-thread-pool? pool)
|
||||
(fixed-size-thread-pool-default-checkout-timeout pool)
|
||||
(assq-ref (resource-pool-configuration
|
||||
|
|
@ -197,9 +219,13 @@ from there, or #f if that would be an empty string."
|
|||
(exception-accessor
|
||||
&thread-pool-timeout-error
|
||||
(record-accessor &thread-pool-timeout-error 'pool)))
|
||||
(set-procedure-property! thread-pool-timeout-error-pool 'documentation
|
||||
"Return the pool from a @code{&thread-pool-timeout-error} exception.")
|
||||
|
||||
(define thread-pool-timeout-error?
|
||||
(exception-predicate &thread-pool-timeout-error))
|
||||
(set-procedure-property! thread-pool-timeout-error? 'documentation
|
||||
"Return @code{#t} if OBJ is a @code{&thread-pool-timeout-error} exception.")
|
||||
|
||||
(define* (make-fixed-size-thread-pool size
|
||||
#:key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue