require 'simple-pool'
pool = SimplePool.new(100)
10000.times do |task_num|
pool.invoke do
puts "#{Thread.current.object_id} is doing task #{task_num}"
sleep(0.5)
end
end
pool.wait_until_finish
-
Notifications
You must be signed in to change notification settings - Fork 0
ireullin/simple-pool
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A simple thread pool
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published