You'd have to do the same thing that users of the other script languages do, they only perform limited computation and if their computation is incomplete, they yield and pick up later. The real issue becomes a matter of how light weight are ruby threads/objects and exactly how many do you expect to be running at once. Also, the JRuby and IronRuby stuff looks promising at increasing the speed of ruby drastically. TongKe Xue wrote: > Hey Everyone, > > I'm working on a massive simulation project (like worldforge). I need > to > be able to allow users to script objects in the world. I am thinking of > ussing Ruby as my scripting language of choice. However: > > (1) I need to be able to limit the memory usage of the object. > (2) I need to be able to limit the CPU cycle usage of the object. > > I.e. I don't want users to use my game to calculate digits of PI. > > Is there a way (or an existing implemntation of Ruby) to let me > create > these light-weight tasklets/threadlets/processlets (there's too many > objects to have a UNIX process for each object) such that I can limit > the > memory/cpu usage on each? > > > Thanks, > --TongKe > (When replying, please do reply all as I might unsubscribe due to the > traffic.) -- Posted via http://www.ruby-forum.com/.