class method
Thread.start
(*untyped args) { (?) -> void } -> instance
Thread.start([args]*) {|args| block } → thread
Thread.fork([args]*) {|args| block } → thread
thread.c
View on GitHub ↗
static VALUE
thread_start(VALUE klass, VALUE args)
{
struct thread_create_params params = {
.type = thread_invoke_type_proc,
.args = args,
.proc = rb_block_proc(),
};
return thread_create_core(rb_thread_alloc(klass), ¶ms);
}
Basically the same as ::new. However, if class Thread is subclassed, then calling start in that subclass will not invoke the subclass’s initialize method.
See also
.report_on_exception=
.stop
.report_on_exception
#[]
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0