Couldn’t you solve this problem with something like this:
https://ruby-concurrency.github.io/concurrent-ruby/master/Co...
https://ruby-concurrency.github.io/concurrent-ruby/master/Co...
1. there are lots of problems preventing this working in practice currently (see my sister comment here: https://news.ycombinator.com/item?id=39433274).
2. the result of doing this is not the beautiful ruby code you are used to, compared to languages that have been designed for concurrency from the beginning.