method
name=
ruby latest stable - Class:
Thread
name=(p1)public
static VALUE
rb_thread_setname(VALUE thread, VALUE name)
{
rb_thread_t *target_th = rb_thread_ptr(thread);
if (!NIL_P(name)) {
rb_encoding *enc;
StringValueCStr(name);
enc = rb_enc_get(name);
if (!rb_enc_asciicompat(enc)) {
rb_raise(rb_eArgError, "ASCII incompatible encoding (%s)",
rb_enc_name(enc));
}
name = rb_str_new_frozen(name);
}
target_th->name = name;
if (threadptr_initialized(target_th)) {
native_set_another_thread_name(target_th->thread_id, name);
}
return name;
} Related methods
- Instance methods
- []
- []=
- abort_on_exception
- abort_on_exception=
- add_trace_func
- alive?
- backtrace
- backtrace_locations
- exit
- fetch
- group
- inspect
- join
- key?
- keys
- kill
- name
- name=
- pending_interrupt?
- priority
- priority=
- raise
- report_on_exception
- report_on_exception=
- run
- safe_level
- set_trace_func
- status
- stop?
- terminate
- thread_variable?
- thread_variable_get
- thread_variable_set
- thread_variables
- to_s
- value
- wakeup
- Class methods
- DEBUG
- DEBUG=
- abort_on_exception
- abort_on_exception=
- current
- exclusive
- exit
- fork
- handle_interrupt
- kill
- list
- main
- new
- pass
- pending_interrupt?
- report_on_exception
- report_on_exception=
- start
- stop