Brent Roman wrote:
> If all this seems a bit too good to be true, it just might be.
> I've tested the patch against our multi-threaded "killer" app that
> managed to crash all unpatched versions of Ruby 1.6.8, 1.8.x, 1.9 and JRuby.
> If you've got a multi-threaded test or application, I invite you to
> try it against this patch.  Feedback would be very much appreciated.

I'd love to know what broke in JRuby. I tried both benchmarks and 
they're very snappy on my machine. We're making a big push to get JRuby 
threading solid, so please let us know what you've seen.

> Yes, there are a couple side effects:
> 
> 1)  ruby backtraces from child threads will now end at the thread's
> creation.
>      Frames from other thread's will no longer be included in any backtrace.
>      I strongly suspect that Ruby 1.9, JRuby and other "native threaded"
>      Ruby implementations will behave this way as well.
>      (Can anyone confirm this?)

In JRuby the parent thread's stack definitely does not show up in the 
child thread. It is a new thread in all ways. Carrying along the old 
frames would mean copying them (as in MRI), since the objects and memory 
for those frames are reused in place most of the time. I believe 1.9 
does a similar optimization.

- Charlie