Closed Suvian-wy closed 9 months ago
Sorry for the delay.
The reason why your program didn't get an ErrPoolOverload
, is that it got blocked at line err := p.Invoke(task)
in the sixth task, it would wait until the first five tasks to finish, then the rest of tasks would be submitted successfully.
You can check out the right way to test this feature: https://github.com/panjf2000/ants/blob/27685ba40874decc26c0e6e845a969412059772d/ants_test.go#L469-L502
Questions with details
OS: macos go version: 1.21.1
I have settes the max block task count, expected to get err when I summit 7 8 9 task, but i get nothing, each task is run success
Code snippets (optional)