nspcc-dev / nspcc-dev/neofs-node
Release ants worker pools
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Mentioned by @fyrchik in https://github.com/nspcc-dev/neofs-node/pull/899.
We use ants.Pool as an implementation of limited worker pools. Each instance should be closed (Release method) after there is no more need in pool (almost always on application shutdown).
- I'd be better to concentrate the implementation of
util.WorkerPoolinterface in a single package (e.g.util/antspool) and use it instead of direct calls like in https://github.com/nspcc-dev/neofs-node/pull/899. - Extend
util.WorkerPoolinterface withio.Closer. - Close all pools in application
onShutdownor inClosemethods of each component.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the util.WorkerPool interface and the direct ants.Pool usage referenced in pull request 899. Trace application onShutdown and each component's Close method to identify every pool that needs release. Done means worker-pool creation is concentrated behind util/antspool, the interface includes io.Closer, and all pools are closed during shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100