mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +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 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…
x
Reference in New Issue
Block a user