gopkg icon indicating copy to clipboard operation
gopkg copied to clipboard

Fix pool.go : exists p.workerCount > p.cap

Open wangzhione opened this issue 5 months ago • 0 comments

step 1 : p.WorkerCount() < atomic.LoadInt32(&p.cap) step 2 : p.incWorkerCount()  step 1 + step 2 not atomic operation , causing the worker count to exceed the cap

So Fix to atomic.CompareAndSwapInt32

wangzhione avatar Sep 19 '24 22:09 wangzhione