MCPcopy
hub / github.com/panjf2000/ants / Cap

Method Cap

ants.go:358–360  ·  view source on GitHub ↗

Cap returns the capacity of this pool.

()

Source from the content-addressed store, hash-verified

356
357// Cap returns the capacity of this pool.
358func (p *poolCommon) Cap() int {
359 return int(atomic.LoadInt32(&p.capacity))
360}
361
362// Tune changes the capacity of this pool, note that it is noneffective to the infinite or pre-allocation pool.
363func (p *poolCommon) Tune(size int) {

Callers 11

FreeMethod · 0.95
TuneMethod · 0.95
retrieveWorkerMethod · 0.95
revertWorkerMethod · 0.95
TestAntsPoolFunction · 0.45
TestInfinitePoolFunction · 0.45
TestInfinitePoolWithFuncFunction · 0.45
TestRestCodeCoverageFunction · 0.45
CapFunction · 0.45

Calls

no outgoing calls

Tested by 6

TestAntsPoolFunction · 0.36
TestInfinitePoolFunction · 0.36
TestInfinitePoolWithFuncFunction · 0.36
TestRestCodeCoverageFunction · 0.36