[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Global lock

Eustaquio Rangel de Oliveira Jr.

10/14/2006 4:04:00 PM

Hi there!

Does Ruby threading model uses a global lock as Python uses?

Thanks!

--
Posted via http://www.ruby-....

5 Answers

Yukihiro Matsumoto

10/14/2006 4:26:00 PM

0

Hi,

In message "Re: Global lock"
on Sun, 15 Oct 2006 01:03:37 +0900, "=?utf-8?Q?Eust=c3=a1quio_Rangel?=" <eustaquiorangel@yahoo.com> writes:

|Does Ruby threading model uses a global lock as Python uses?

No. It's worse (in a sense). It uses its own green thread.

matz.

Eustaquio Rangel de Oliveira Jr.

10/14/2006 5:04:00 PM

0

Yukihiro Matsumoto wrote:
> |Does Ruby threading model uses a global lock as Python uses?
> No. It's worse (in a sense). It uses its own green thread.

Thanks for your answer, Matz! Can you give me a tip where I can learn
more things about this matter? I mean, some URL for
documentation/article or where to look on the Ruby source code?

Thanks again!

--
Posted via http://www.ruby-....

Yukihiro Matsumoto

10/16/2006 3:48:00 PM

0

Hi,

In message "Re: Global lock"
on Sun, 15 Oct 2006 02:04:02 +0900, "=?utf-8?Q?Eust=c3=a1quio_Rangel?=" <eustaquiorangel@yahoo.com> writes:

|Thanks for your answer, Matz! Can you give me a tip where I can learn
|more things about this matter? I mean, some URL for
|documentation/article or where to look on the Ruby source code?

See http://www.ruby-lang.org/en/... for source download
instruction. For threading matters, eval.c has everything.
Note: beware. it's a black magic inside.

matz.

Tomasz Wegrzanowski

10/16/2006 4:07:00 PM

0

On 10/16/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> In message "Re: Global lock"
> on Sun, 15 Oct 2006 02:04:02 +0900, "=?utf-8?Q?Eust=c3=a1quio_Rangel?=" <eustaquiorangel@yahoo.com> writes:
>
> |Thanks for your answer, Matz! Can you give me a tip where I can learn
> |more things about this matter? I mean, some URL for
> |documentation/article or where to look on the Ruby source code?
>
> See http://www.ruby-lang.org/en/... for source download
> instruction. For threading matters, eval.c has everything.
> Note: beware. it's a black magic inside.

Jumping directly to eval.c can be very scary.
It is probably easier to follow order given in
http://eigenclass.org/hiki.rb?ruby+inter...

--
Tomasz Wegrzanowski [ http://t-a-w.blo... ]

Eustaquio Rangel de Oliveira Jr.

10/16/2006 4:58:00 PM

0

>> See http://www.ruby-lang.org/en/... for source download
>> instruction. For threading matters, eval.c has everything.
>> Note: beware. it's a black magic inside.

> Jumping directly to eval.c can be very scary.
> It is probably easier to follow order given in
> http://eigenclass.org/hiki.rb?ruby+inter...

I download and compile the sources on every release, I made a Slackware
build file some months ago for it. :-)

I opened eval.c before, just needed to make sure I was on the right
place (I searched for "thread" on the source code and there I was) and
as you and Tomasz said, it's scary and looks like black magic going
directly there, but I'll take a look carefully.

Thanks again!



--
Posted via http://www.ruby-....