mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-17 18:51:02 +00:00
add comments
This commit is contained in:
parent
e8ccc8ecca
commit
e538683d3f
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…
x
Reference in New Issue
Block a user