Source File
pooloptions.go
Belonging Package
github.com/alitto/pond/v2
package pondimport ()type Option func(*pool)// WithContext sets the context for the pool.func ( context.Context) Option {return func( *pool) {.ctx =}}// WithQueueSize sets the max number of elements that can be queued in the pool.func ( int) Option {return func( *pool) {.queueSize =}}// WithNonBlocking sets the pool to be non-blocking when the queue is full.// This option is only effective when the queue size is set.func ( bool) Option {return func( *pool) {.nonBlocking =}}// WithoutPanicRecovery disables panic interception inside worker goroutines.// When this option is enabled, panics inside tasks will propagate just like regular goroutines.func () Option {return func( *pool) {.panicRecovery = false}}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |