[ruby-core:88476] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid

From: Koichi Sasada <ko1@...>
Date: 2018-08-14 08:22:44 UTC
List: ruby-core #88476
On 2018/08/14 9:42, Eric Wong wrote:
> I am thinking of adding preemption support to this feature for
> compatibility with 1.8

So that "auto-fiber" proposal is to provide green threads like Ruby 1.8?

Like:
```
   model 1: Userlevel Thread
     Same as traditional ruby thread.
```
in thread.c comment (I wrote 13 years ago!).

I don't against this idea, but I think it is hard to select these 
options by Ruby programmers. I think changing Thread implementation 
model from native thread (1:1 model) to green thread mode (1:N model) is 
better for Ruby programmers.

To change them, we need to discuss pros. and cons. of them carefully. 
There are several good points (the biggest advantage of 1:1 model is 
friendly for outer libraries) but are bad points (1:1 model has 
performance penalties, and recent glibc malloc arena issues and so on).

I don't think it is a good idea to choose such internal implementation 
by Ruby programmers. ... easy?

-- 
// SASADA Koichi at atdot dot net

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread