Embedding Ruby in a C++ application...

S

Steve [RubyTalk]

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?
 
W

Wayne Vucenic

S

Steve [RubyTalk]

Wayne said:
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
 
W

Wilson Bilkovich

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?
No idea, but it will happen sooner if more serious C people contribute to Y=
ARV:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top