Created
December 26, 2018 15:44
-
-
Save marzdgzmn/37ef33a17716fae30db86446b4d8b769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thread_pool = Concurrent::FixedThreadPool.new(10, max_queue:50) | |
until job_list.empty? | |
job = job_list.shift | |
Concurrent::Promises.future(executor: thread_pool) { MyJob.run(job) }. | |
rescue{ |e| puts e }.result | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment