will there be ability to use both native and green threads in Ruby1.9/2.0

V

Voroztsov Artem

Does anybody know will there be support for both native and green
threads in Ruby 1.9/2.0?

I found letter with unanswered question in ruby-core:

2007/11/14 said:
-----Original Message-----
From: David Flanagan [mailto:[email protected]]
Sent: Wednesday, November 14, 2007 11:31 AM
To: (e-mail address removed)
Subject: Re: state of threads in 1.9
Are Threads mapped to threads on the underlying operating system in
1.9 or still using green threads?
If still using green threads, it is so because of a designing decision
or it is a limitation of the current implementation?

As others have responded, Ruby 1.9 uses native threads. But
you still don't get true concurrency. The fear is that there
are extensions that are not thread-safe yet. So even though
native threads are used, only one is allowed to run at a
time. This means that you won't see increased performance
running a multi-threaded Ruby program on a multi-core CPU,
for example.

Can't we have both native *and* green threads? There are advantages and
disadvantages to both, yes? I know at least one user who says he won't
be able to use Ruby 1.9/2.0 because he's using it on very old hardware
(486's) for Point of Sale software. The native threads will be too
heavy.

Really, the only time that I've needed native thread support is for
extending existing C libraries. I don't see the upside for general
concurrency, since we're not getting multi-core support anyway.

Have I missed something?

Regards,

Dan
 

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
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top