worker_pool v2.0.3
worker_pool
Allocates a minimum number fibers for performing work
- grows and shrinks the pool as required
- reduces the overhead of allocating fibers for repetitive, bursty, work
- handles long running tasks like websockets
Installation
-
Add the dependency to your
shard.yml
:dependencies: worker_pool: github: spider-gazelle/worker_pool
-
Run
shards install
Usage
require "worker_pool"
pool = WorkerPool.new(100)
100.times do
pool.perform { my_task }
end
Contributing
- Fork it (https://github.com/spider-gazelle/worker_pool/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Stephen von Takach - creator and maintainer
Repository
worker_pool
Owner
Statistic
- 5
- 0
- 0
- 0
- 0
- over 1 year ago
- May 4, 2023
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 08:26:46 GMT
Languages