# Embedding ruby 1.9 using native threads

**URL:** <https://rubytalk.org/t/embedding-ruby-1-9-using-native-threads/44343>\
**Category:** ruby-talk\
**Created:** [7 February 2008 17:45 UTC](https://rubytalk.org/t/embedding-ruby-1-9-using-native-threads/44343 "2008-02-07T17:45:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb\_123](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Deb\_123](https://rubytalk.org/u/Deb_123)\
**Post date:** [7 February 2008 17:45 UTC](https://rubytalk.org/t/embedding-ruby-1-9-using-native-threads/44343/1 "2008-02-07T17:45:54Z")

</div>

Hi All,  
I've heard that the new ruby interpreter v1.9 is able to handle native  
OS threads. However, i've tried a few different ways of running  
multiple interpreters in separate threads (on XP), and it doesn't seem  
to work. Is there any special initialization to make to the ruby  
interpreter, or something i might be missing?

Thanks!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Tom\_M](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Tom\_M](https://rubytalk.org/u/Tom_M)\
**Post date:** [7 February 2008 18:54 UTC](https://rubytalk.org/t/embedding-ruby-1-9-using-native-threads/44343/2 "2008-02-07T18:54:56Z")

</div>

I am not sure, but just as a warning, I don't think 1.9 native threads  
don't deliver what you might think. It's my understanding that while  
there is native thread support, there will be a global interpreter  
lock, so that for virtually everything happening only one thread will  
be executing at a time pretty much all the time.

> **···**
>
> On Feb 7, 12:45 pm, Deb 123 \<deba...@sympatico.ca\> wrote:
> 
> > Hi All,  
> > I've heard that the new ruby interpreter v1.9 is able to handle native  
> > OS threads. However, i've tried a few different ways of running  
> > multiple interpreters in separate threads (on XP), and it doesn't seem  
> > to work. Is there any special initialization to make to the ruby  
> > interpreter, or something i might be missing?
> > 
> > Thanks!  
> > --  
> > Posted viahttp://www.ruby-forum.com/.

---

<div class="post-metadata">

**Author:** ![Deb\_123](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Deb\_123](https://rubytalk.org/u/Deb_123)\
**Post date:** [20 February 2008 22:15 UTC](https://rubytalk.org/t/embedding-ruby-1-9-using-native-threads/44343/3 "2008-02-20T22:15:44Z")

</div>

Tom M wrote:

> **···**
>
> > On Feb 7, 12:45 pm, Deb 123 \<deba...@sympatico.ca\> wrote:
> > 
> > > Hi All,  
> > > I've heard that the new ruby interpreter v1.9 is able to handle native  
> > > OS threads. However, i've tried a few different ways of running  
> > > multiple interpreters in separate threads (on XP), and it doesn't seem  
> > > to work. Is there any special initialization to make to the ruby  
> > > interpreter, or something i might be missing?
> > > 
> > > Thanks!  
> > > --  
> > > Posted viahttp://www.ruby-forum.com/.
> > 
> > I am not sure, but just as a warning, I don't think 1.9 native threads  
> > don't deliver what you might think. It's my understanding that while  
> > there is native thread support, there will be a global interpreter  
> > lock, so that for virtually everything happening only one thread will  
> > be executing at a time pretty much all the time.
> 
> Thanks Tom, Sorry for the late reply. So it's multithreading, but it  
> still has to run sequentially.. Well I guess i'll have to find a way  
> around it 😉  
> Thanks for clearing that up!  
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
