From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_PASS,T_RP_MATCHES_RCVD shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 1FDB71F576 for ; Wed, 21 Feb 2018 08:23:22 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 712091209DA; Wed, 21 Feb 2018 17:23:18 +0900 (JST) Received: from mail.atdot.net (ik1-326-23156.vs.sakura.ne.jp [153.126.180.160]) by neon.ruby-lang.org (Postfix) with ESMTP id 333501209A5 for ; Wed, 21 Feb 2018 17:23:14 +0900 (JST) To: Ruby developers , Eric Wong References: <20180220090654.GA14869@dcvr> <020e87b3-b53d-8ebc-3993-88abf854ebd2@atdot.net> <20180221080751.GB29046@starla> From: Koichi Sasada Message-ID: <9066d89f-9bf7-f6a7-a2b6-b00a4f7168ed@atdot.net> Date: Wed, 21 Feb 2018 17:23:13 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180221080751.GB29046@starla> Content-Language: en-US X-ML-Name: ruby-core X-Mail-Count: 85727 Subject: [ruby-core:85727] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" On 2018/02/21 17:07, Eric Wong wrote: >> Or `Thread.create(keyword_args...)` ? (`.create` is an example name). > > One problem with a singleton method in "Thread" is separating args > intended for Thread creation vs args for block. We have the > same problem for Thread.new, too. > > Maybe Thread::Attr can be used like Struct: > > ``` > Thread::Attr.new(type: :coop, ...).new(_a) do |a| > ... > end > > > class MyActor < Thread::Attr.new(type: :coop) > ... > end > MyActor.new(_a) { |a| ... } > ``` We have discussed similar ideas. https://bugs.ruby-lang.org/issues/3187#note-8 https://bugs.ruby-lang.org/issues/6694 (and maybe we can find other related tickets) `Attr` is new naming idea and we need to discuss about it. > Yes, garbage from kwargs still annoys me; but that's a separate > problem which I hope can be fixed sooner. Just now I'm working on it (to present at OkinawaRubyKaigi02, Japan regional Ruby conference. This is Event-Driven-Development). -- // SASADA Koichi at atdot dot net