From: Ezra Zygmuntowicz Date: 2010-02-13T09:35:07+09:00 Subject: Re: embedding ruby On Feb 12, 2010, at 4:05 PM, Jörg W Mittag wrote: > Josep Pujol wrote: >> Thanks for your answer. >> >> Jörg W Mittag wrote: >>> Personally, I would look at Rubinius, JRuby or IronRuby for embedding, >>> rather than MRI or YARV. But really, I would look at Lua, because >>> while you can find a Ruby *implementation* that is specifically >>> designed for embedding, this doesn't change the fact that the Ruby >>> *language* isn't. >> I've just downloaded the rubinius code and I read this statement in the >> README file. >> >> 5. Goals >> >> * Thread safety. Rubinius intends to be thread-safe so you could embed >> more than one interpreter in a single application. It does not currently >> meet this goal due to some components borrowed from the mainline Ruby >> interpreter. >> >> Is this true also for the 1.0 version? (or this is an old statement that >> hasn't been removed) > > I'm not sure. I haven't followed Rubinius recently, and pretty much > *everything* has changed since I last followed it closely: a new VM, > three new parsers, a new compiler, a new garbage collector, a new > threading model. Literally *nothing* is like when I last looked at it. > > However, please note that this snippet only talks about embedding > *multiple* Rubinius interpreters into a *single process*. Also, it > specifically mentions that the problematic parts are borrowed from > MRI/YARV, which means that if you use one of those, you will have to > deal with the exact same problems. You can currently run multiple rubinius VM's in one process, each VM will run on it's own native thread in parallel and there is a simple message passing interface to pass messages between running VM's. Cheers- Ezra Zygmuntowicz ez@engineyard.com