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

Discussion in 'Ruby' started by Voroztsov Artem, Nov 24, 2007.

  1. 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, Berger, Daniel <>:
    > > -----Original Message-----
    > > From: David Flanagan [mailto:]
    > > Sent: Wednesday, November 14, 2007 11:31 AM
    > > To:
    > > Subject: Re: state of threads in 1.9
    > >
    > > Jordi wrote:
    > > > 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
     
    Voroztsov Artem, Nov 24, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chas
    Replies:
    3
    Views:
    375
    Roedy Green
    Nov 18, 2003
  2. Naresh Agarwal

    Green threads in Java

    Naresh Agarwal, Jan 9, 2004, in forum: Java
    Replies:
    2
    Views:
    5,550
    Andrew Thompson
    Jan 9, 2004
  3. Iñaki Baz Castillo
    Replies:
    14
    Views:
    259
    Iñaki Baz Castillo
    Apr 5, 2009
  4. Matt Brooks
    Replies:
    5
    Views:
    139
    Robert Klemme
    Oct 10, 2009
  5. Iñaki Baz Castillo
    Replies:
    7
    Views:
    693
    Rick DeNatale
    Dec 3, 2009
Loading...

Share This Page