Wow, thanks for all your help, greatly appreciated. > The Global Interpreter Lock (GIL) prevents threads from executing in > parallel when using Ruby 1.8.6 aka MRI, 1.8.7, and 1.9.1 aka YARV. > However, JRuby 1.3.x/1.4.x, MacRuby 0.5 Beta 2, Maglev and several > other upcoming Ruby VMs are not constrained by the GIL. Thus, they > can execute threads in parallel.
The reason why we didn't choose jRuby was because it uses too much memory to be able to run this on a VPS. Is there any documentation available on using jRuby on a low-memory (<256MB) system? I've looked for it, but couldn't find it. Maybe there's an alternative workaround for the GIL? Our application uses up quite alot of memory, so when presented with the jRuby vs. Ruby (EE) question, I thought it was a choice between thread safety and memory usage, so I chose the latter. I didn't know there was more to think about. > Regardless, I can't seem to reproduce the OPs behviour: Which Ruby implementation are you using? I'm very sure every thread in my piece of code is waiting for the other thread to finish, because I log the time at which the data is saved. Most of the time there's 10 - 40 seconds between them, even though the backgroundrb process should save at least one object every second. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

