[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01661] Re: Ruby: GC control and thread safety

From: Dave Thomas <Dave@...>
Date: 2000-03-01 13:04:39 UTC
List: ruby-talk #1661
The following message is a courtesy copy of an article
that has been posted to comp.lang.misc as well.

Yukihiro Matsumoto <matz@netlab.co.jp> writes:

> weakref_valid? cannot assure more than validness at the specific moment.
> In such race condition, I think you have to rely on exceptions.

Agreed. I included it because it was an example of where problems with
the GC calls could arise.

> I don't want to be under such circumstance where several threads need
> to disable GC, which I think should be avoided.  Let's discuss about
> it.  If it is needed, adding nesting count to GC.{enable,disable} is
> pretty easy.

Well.. I agree that enabling and disabling GC is a pretty ugly thing
to do. However, if we _are_ going to do it, then right now it is
pretty difficult to do in a multi-threaded environment. If we added the 
nesting count in the C-code enable/disable calls, it would become
trivial.

I don't know if backwards-compatibility is an issue. If it is, we
could add an extra call, maybe GC.use_nesting, to turn the facility on 
and off.

It isn't a big thing, though. Just an observation, really.


Regards


Dave

In This Thread

Prev Next