core
core copied to clipboard
Refactor pool
- factory mode
- sync function for test
- work stealing mode, keep one goroutine pool
- recycle goroutine with time or jobCount
bonus:make nil value a valid pool, like sync.WaitGroup. (so that we don't have to inject it in tests)