Closed 50541b17-99bc-ed9b-8a10-738bffa6b2ca closed 11 years ago
Thanks for the suggestion!
I don't think it is possible to send ruby code across processes as easy as it is across threads (don't share memory). Still the GIL thing is not such an issue because in most of futuroscope's use cases you will be issuing an interruption (network, database...).
And you always have JRuby and Rubinius, of course.
True, not as easy. You could look for inspiration here though https://github.com/grosser/parallel/blob/master/lib/parallel.rb
That library allows one to easily switch between the two.
Problem here is we're not dealing with a worker - job scenario. In order for a future block to be executed in the pool, it must live in the same memory space than the one who emitted it. I believe there isn't any trick (marshalling) that would work here.
Any ideas?
Not yet. :)
Works around the GIL issue.