I understand from the documentation that when I embed Ruby in a native application that the Ruby interpreter is not thread safe - i.e. that I can't concurrently evaluate different ruby expressions in separate native threads - if my application is multi-threaded that I must somehow enforce mutual exclusion myself. This seems pretty restrictive - especially with today's multi-processor servers and hyper-threading.
Are there any plans to make a future version of Ruby thread safe? Can anyone comment as to how difficult it would likely prove to modify Ruby 1.8 to establish a bespoke version which is thread safe? Is there a good reason for the decision to use global variables in the implementation of the ruby interpreter which would make such modifications undesirable to the wider Ruby community?
Hi Steve,
Are there any plans to make a future version of Ruby thread safe?
Ruby 2.0 will support native threads.
Can anyone comment as to how difficult it would likely prove to modify Ruby
1.8 to establish a bespoke version which is thread safe?
Check out Sydney:
http://rubyforge.org/projects/sydney/
http://blog.fallingsnow.net
Wayne Vucenic
No Bugs Software
Ruby and C++ Agile Contract Programming in Silicon Valley
Wayne Vucenic wrote:
Are there any plans to make a future version of Ruby thread safe?
Ruby 2.0 will support native threads.
Thanks, that is fantastic news...
My only remaining question is what time-scale are we talking about before Ruby 2.0 might be available. I understand the "when it is ready" perspective... but realistically will I be counting the weeks, months, years or decades before 2.0 becomes a stable release?
Steve
No idea, but it will happen sooner if more serious C people contribute to YARV:
http://www.atdot.net/yarv/
..which has its own mailing list:
http://rubyforge.org/mailman/listinfo/yarv-devel
YARV is the VM/thread implementation that will be present in Ruby 2.0.
--Wilson.
ยทยทยท
On 10/20/05, Steve [RubyTalk] <steve_rubytalk@shic.co.uk> wrote:
Wayne Vucenic wrote:
>> Are there any plans to make a future version of Ruby thread safe?
>>
> Ruby 2.0 will support native threads.
>
Thanks, that is fantastic news...
My only remaining question is what time-scale are we talking about
before Ruby 2.0 might be available. I understand the "when it is ready"
perspective... but realistically will I be counting the weeks, months,
years or decades before 2.0 becomes a stable release?