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

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