Skip to content

Instantly share code, notes, and snippets.

@gipsh
Created July 25, 2019 19:07
Show Gist options
  • Save gipsh/b6cc9157e0b53fe2e3fc8b299cf13414 to your computer and use it in GitHub Desktop.
Save gipsh/b6cc9157e0b53fe2e3fc8b299cf13414 to your computer and use it in GitHub Desktop.
concurrency thread pool
require 'concurrent-ruby'
$pool = Concurrent::FixedThreadPool.new(2)
$pool.post do
{your function or block}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment