3 ms·
Use a semaphore instead. That's what it is built for. That way you don't need to make a complex fiber scheme just for resource management. Spin up as many as
by cogman10 6y ago
Use a semaphore instead. That's what it is built for.
That way you don't need to make a complex fiber scheme just for resource management. Spin up as many as you need an the runtime will do the task pool for you.
https://ruby-concurrency.github.io/concurrent-ruby/1.1.4/Concurrent/Semaphore.html https://ruby-concurrency.github.io/concurrent-ruby/1.1.4/Con...