# Embedding ruby 1.9 using native threads

**URL:** <https://www.ruby-forum.com/t/embedding-ruby-1-9-using-native-threads/128443>\
**Category:** Ruby\
**Created:** [February 7, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/embedding-ruby-1-9-using-native-threads/128443 "2008-02-07T18:45:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deb123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@deb123](https://www.ruby-forum.com/u/deb123)\
**Post date:** [February 7, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/embedding-ruby-1-9-using-native-threads/128443/1 "2008-02-07T18:45:55Z")

</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!

---

<div class="post-metadata">

**Author:** ![deb123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@deb123](https://www.ruby-forum.com/u/deb123)\
**Post date:** [February 7, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/embedding-ruby-1-9-using-native-threads/128443/2 "2008-02-07T19:56:11Z")

</div>

On Feb 7, 12:45 pm, Deb 123 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![deb123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@deb123](https://www.ruby-forum.com/u/deb123)\
**Post date:** [February 20, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/embedding-ruby-1-9-using-native-threads/128443/3 "2008-02-20T23:15:49Z")

</div>

Tom M wrote:

> On Feb 7, 12:45 pm, Deb 123 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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!
