github.com/Aoi-hosizora/ahlib@v1.5.1-0.20230404072829-241b93cf91c7/xgopool/README.md (about)

     1  # xgopool
     2  
     3  ## Dependencies
     4  
     5  + (xtesting)
     6  
     7  ## Documents
     8  
     9  ### Types
    10  
    11  + `type GoPool struct`
    12  
    13  ### Variables
    14  
    15  + None
    16  
    17  ### Constants
    18  
    19  + None
    20  
    21  ### Functions
    22  
    23  + `func New(cap int32) *GoPool`
    24  + `func SetWorkersCap(cap int32)`
    25  + `func SetPanicHandler(handler func(context.Context, interface{}))`
    26  + `func WorkersCap() int32`
    27  + `func NumWorkers() int32`
    28  + `func NumTasks() int32`
    29  + `func Go(f func())`
    30  + `func CtxGo(ctx context.Context, f func(context.Context))`
    31  
    32  ### Methods
    33  
    34  + `func (g *GoPool) SetWorkersCap(cap int32)`
    35  + `func (g *GoPool) SetPanicHandler(handler func(context.Context, interface{}))`
    36  + `func (g *GoPool) WorkersCap() int32`
    37  + `func (g *GoPool) NumWorkers() int32`
    38  + `func (g *GoPool) NumTasks() int32`
    39  + `func (g *GoPool) Go(f func())`
    40  + `func (g *GoPool) CtxGo(ctx context.Context, f func(context.Context))`