Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Wrapper ¶
type Wrapper interface { // Wrap exec func in goroutine without recover catch Wrap(fn func()) // WrapWithRecover safely execute func in goroutine WrapWithRecover(fn func()) // Wait this func wait all goroutine finish Wait() }
Wrapper wrap goroutine to run
func NewChanWrapper ¶
NewChanWrapper create wrapChanImpl entity If the wrapper using the chan method needs to specify the number of goroutines to be executed,the WithBufCap method needs to be called. Otherwise, after the Wait method is executed, some goroutines will exit without execution.
Click to show internal directories.
Click to hide internal directories.