What's meant by a thread-safe Ruby interpreter?

611 views Asked by At

In a 2000 interview (that is, pre-YARV), Matz said

Matz: I'd like to make it faster and more stable. I'm planning a full rewrite of the interpreter for Ruby 2.0, code-named "Rite". It will be smaller, easier to embed, thread-safe, and faster. It will use a bytecode engine. It will probably take me years to implement, since I'm pretty busy just maintaining the current version.

What was meant by "thread-safe" in this context? An interpreter that allowed you to use green threads? An interpreter that allowed you to use native threads? An interpreter that didn't have a global interpreter lock (GVL in YARV Ruby terminology)?

1

There are 1 answers

0
Michael Slade On

At the moment ruby's threading is less than ideal. Ruby can use threading and the threading works fine, but because of its current threading mechanism, the long-and-short of it is that one interpreter can only use one CPU core at a time; there are also other potential issues.

If you want all the gory details, This article covers it pretty well.