forked from mirror/ants
Merge branch 'master' into develop
This commit is contained in:
commit
e8b1147e29
3
pool.go
3
pool.go
|
@ -52,7 +52,10 @@ type Pool struct {
|
|||
|
||||
// lock for synchronous operation.
|
||||
lock sync.Mutex
|
||||
|
||||
// cond for waiting idle worker
|
||||
cond *sync.Cond
|
||||
|
||||
once sync.Once
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,10 @@ type PoolWithFunc struct {
|
|||
|
||||
// lock for synchronous operation.
|
||||
lock sync.Mutex
|
||||
|
||||
// cond for waiting idle worker
|
||||
cond *sync.Cond
|
||||
|
||||
// pf is the function for processing tasks.
|
||||
poolFunc pf
|
||||
|
||||
|
|
Loading…
Reference in New Issue