github.com/aaabigfish/gopkg@v1.1.0/gopool/README.md (about)

     1  # gopool
     2  
     3  ## Introduction
     4  
     5  `gopool` is a high-performance goroutine pool which aims to reuse goroutines and limit the number of goroutines.
     6  
     7  It is an alternative to the `go` keyword.
     8  
     9  ## Features
    10  
    11  - High Performance
    12  - Auto-recovering Panics
    13  - Limit Goroutine Numbers
    14  - Reuse Goroutine Stack
    15  
    16  ## QuickStart
    17  
    18  Just replace your `go func(){...}` with `gopool.Go(func(){...})`.
    19  
    20  old:
    21  ```go
    22  go func() {
    23  	// do your job
    24  }()
    25  ```
    26  
    27  new:
    28  ```go
    29  gopool.Go(func(){
    30  	/// do your job
    31  })
    32  ```