matz / ruby-lang.org wrote:
> May I add two new candidates (IoThread and Thread::Coop)?

Thanks for the ideas.  I like Thread::Coop; maybe "Thread::Coro"
is good, too...

I don't think IoThread is good if we support Queue/Mutex/...

Also, what do you think about having a way to pass options to
thread creation like pthread_attr_t?

```
	attr = Thread::Attr.new

	# similar to pthread_attr_setscope.  I'm used to NPTL and
	# LinuxThreads only having PTHREAD_SCOPE_SYSTEM and ignored
	# of pthread_attr_setscope until I saw it again with mjit code:
	attr.type = :coop # (default is :native)

	# for advanced users only :)
	attr.vm_stack_size = ...
	attr.machine_stack_size = ...

	# This API gives room for future expansion

	Thread::Attr#create becomes a substitute for Thread.new
	attr.create(*args) # => Thread or Thread::Coop

```

And maybe we unify Thread::Coop and existing "Thread" as
single public "Thread" class to Ruby API; similar to what
we do with "Integer" (vs Bignum/Fixnum)

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