mirror of https://github.com/panjf2000/ants.git
chore: clean up some comments and CI yaml (#296)
This commit is contained in:
parent
aee9c2e2da
commit
45bc4f51ba
|
@ -92,7 +92,7 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.go }}-go-ci
|
||||
|
||||
- name: Run unit tests
|
||||
- name: Run unit tests and integrated tests
|
||||
run: go test -v -race -coverprofile="codecov.report" -covermode=atomic
|
||||
|
||||
- name: Upload code coverage report to Codecov
|
||||
|
|
6
pool.go
6
pool.go
|
@ -107,7 +107,7 @@ func (p *Pool) purgeStaleWorkers(ctx context.Context) {
|
|||
}
|
||||
|
||||
// There might be a situation where all workers have been cleaned up (no worker is running),
|
||||
// while some invokers still are stuck in "p.cond.Wait()", then we need to awake those invokers.
|
||||
// while some invokers still are stuck in p.cond.Wait(), then we need to awake those invokers.
|
||||
if isDormant && p.Waiting() > 0 {
|
||||
p.cond.Broadcast()
|
||||
}
|
||||
|
@ -207,8 +207,6 @@ func NewPool(size int, options ...Option) (*Pool, error) {
|
|||
return p, nil
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Submit submits a task to this pool.
|
||||
//
|
||||
// Note that you are allowed to call Pool.Submit() from the current Pool.Submit(),
|
||||
|
@ -321,8 +319,6 @@ func (p *Pool) Reboot() {
|
|||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
func (p *Pool) addRunning(delta int) {
|
||||
atomic.AddInt32(&p.running, int32(delta))
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ func (p *PoolWithFunc) purgeStaleWorkers(ctx context.Context) {
|
|||
}
|
||||
|
||||
// There might be a situation where all workers have been cleaned up (no worker is running),
|
||||
// while some invokers still are stuck in "p.cond.Wait()", then we need to awake those invokers.
|
||||
// while some invokers still are stuck in p.cond.Wait(), then we need to awake those invokers.
|
||||
if isDormant && p.Waiting() > 0 {
|
||||
p.cond.Broadcast()
|
||||
}
|
||||
|
@ -213,8 +213,6 @@ func NewPoolWithFunc(size int, pf func(interface{}), options ...Option) (*PoolWi
|
|||
return p, nil
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Invoke submits a task to pool.
|
||||
//
|
||||
// Note that you are allowed to call Pool.Invoke() from the current Pool.Invoke(),
|
||||
|
@ -327,8 +325,6 @@ func (p *PoolWithFunc) Reboot() {
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
func (p *PoolWithFunc) addRunning(delta int) {
|
||||
atomic.AddInt32(&p.running, int32(delta))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue