ms-ati/rumonade

Implement Future

Opened this issue · 1 comments

Implement Future along the lines of scala.concurrent.Future

Perhaps it should have pluggable implementations? Some interesting ideas:

https://github.com/grosser/parallel
https://github.com/robgleeson/iprocess
https://github.com/celluloid/celluloid/wiki/futures

Ideally, I think on MRI you would want a back-end based on a process-pool, so that true ruby concurrency would occur. But would you also want a thread pool in each process, so that more than one future could be blocked on IO in each process?

When on JRuby or Rubinius, you probably don't want any process pool, and just a thread pool dispatching the futures.

Thinking down the line, some integration with Celluloid futures would be a good idea?

Maybe relying on concurrent-ruby's would give it more bang for the buck. Celluloid's involve a little bit more care in setup, and more communication with the user (e.g. regarding who starts up the actor system, for instance), and parallel seems focused on collection processing.