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 for synchronous operation.
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
|
|
||||||
|
// cond for waiting idle worker
|
||||||
cond *sync.Cond
|
cond *sync.Cond
|
||||||
|
|
||||||
once sync.Once
|
once sync.Once
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,10 @@ type PoolWithFunc struct {
|
||||||
|
|
||||||
// lock for synchronous operation.
|
// lock for synchronous operation.
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
|
|
||||||
|
// cond for waiting idle worker
|
||||||
cond *sync.Cond
|
cond *sync.Cond
|
||||||
|
|
||||||
// pf is the function for processing tasks.
|
// pf is the function for processing tasks.
|
||||||
poolFunc pf
|
poolFunc pf
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue