Re: Steps to get multiple interpreters per process...
From:
Chris Ross <chris@...>
Date:
2002-06-25 09:19:28 UTC
List:
ruby-core #195
On Tue, 25 Jun 2002 10:05:50 ts wrote: : >>>>> "C" == Chris Ross <chris@darkrock.co.uk> writes: : : C> I store all things that are related to a execution instance in a : C> FeriteScript* and then pass that to all functions. They simply all : C> take a FeriteScript* as the first argument. : : OK, this mean modify all extensions written in C, right ? : : Now if I don't want a version of ruby with multiple interpreter, why give : an extra argument for each functions. : : perl solve this with #define at compile time, and the same extension can : be compiled with or without multi interpreter without modifications. Sure, it can be done with a define. You just stumble upon the issue that you can't mix modules for a multiple interpreter compiled ruby with standard modules and visa versa. Instantly confusion is added to offering multiple downloads of binary forms. This is definatly an issue as debian and other package managers have this problem.You also face the issue of people having to make their library compatible with both sides. In ferite I made the decission the script would be there at all times to keep things consistant and simple. This means that half the hard work of making modules thread safe is done, the rest is up to the programmer. Unfortunatly because ruby has been around longer you face the issue of backwards compatibility. The only way to do this is to change CVS and get people to update their code against it. Yes its a lot of work - but the residual benifits are [imho] worth it. Regards, Chris -- +------------------------------------------------------------------+ | Chris Ross | chris@darkrock.co.uk | ctr@ferite.org | | | http://www.darkrock.co.uk | http://www.ferite.org | +------------------------------------------------------------------+ "Life is an onion and one peels away its layers crying."