Global lock

  • Thread starter Eustáquio Rangel
  • Start date
E

Eustáquio Rangel

Hi there!

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

Thanks!
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Global lock"

|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.
 
E

Eustáquio Rangel

Yukihiro said:
|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!
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Global lock"

|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/downloads/ for source download
instruction. For threading matters, eval.c has everything.
Note: beware. it's a black magic inside.

matz.
 
T

Tomasz Wegrzanowski

In message "Re: Global lock"

|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/downloads/ 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+internals+guide
 
E

Eustáquio Rangel

See http://www.ruby-lang.org/en/downloads/ for source download
Jumping directly to eval.c can be very scary.
It is probably easier to follow order given in
http://eigenclass.org/hiki.rb?ruby+internals+guide

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!
 

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
474,215
Messages
2,571,113
Members
47,710
Latest member
HarleyMoli

Latest Threads

Top