[#138] Thread Problems — Reimer Behrends <behrends@...>

I have been looking at the thread implementation of Ruby for the past

21 messages 1998/12/23
[#164] Re: Thread Problems — matz@... (Yukihiro Matsumoto) 1999/01/05

Hi.

[#167] Makefiles and -lcurses — Klaus.Schilling@... 1999/01/05

Julian Fondren writes:

[#168] Re: Makefiles and -lcurses — Julian Fondren <julian@...> 1999/01/05

OpenBSD has ncurses and it's own ocurses, and I prefer the latter.

[ruby-talk:00144] Re: Thread Problems

From: matz@... (Yukihiro Matsumoto)
Date: 1998-12-25 01:19:51 UTC
List: ruby-talk #144
Hi.

In message "[ruby-talk:00138] Thread Problems"
    on 98/12/22, Reimer Behrends <behrends@cse.msu.edu> writes:

|I have been looking at the thread implementation of Ruby for the past
|couple of days, and I think I may have found a few problems.
|
|For instance, io.c does a lot of checking to see if a thread can block.
|Unfortunately, some of these checks are incomplete. For example, if you run
|the following script, the forked thread blocks everything else as soon as
|you hit enter until you type Ctrl-D.

Hmm, I didn't realize that problem.  Let me think about it.

|P.S.: Is there a reason why the current implementation is fixed at 10
|      time slices a second? Most modern computers should be able to
|      easily handle up to 10 times as much, even if you call select()
|      each time.

Well, there were two reasons for that:

  (1) At the time I decided the slice value, I was using VERY slow
      machine to develop Ruby.

  (2) Context switching for Ruby's thread is relatively slow, since it 
      copies stack to heap and vice versa.  I was afraid of thrashing.

This may need to be a configurable value.
                                                        matz.

In This Thread