aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 10:58:14 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 10:58:14 +0000
commite2a930c73a77c39f1b2aa6fa405afbab583abea2 (patch)
treedec0346a0063b3e916addb929e1000ee5bc26960
parent9dcf6d9f967620478184fd2a3bdaa24c78176b78 (diff)
downloadruby-e2a930c73a77c39f1b2aa6fa405afbab583abea2.tar.gz
add Thread.name and Thread.name= docs Feature #11251 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog2
-rw-r--r--NEWS3
-rw-r--r--thread.c5
3 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e2d7bee39..d530af9bff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,7 +10,7 @@ Sat Jun 13 17:35:11 2015 NARUSE, Yui <naruse@ruby-lang.org>
* vm.c (th_init): initialize th->name.
- * thread.c (Init_Thread): add Thread.name and Thread.name=.
+ * thread.c (Init_Thread): add Thread.name and name=. [Feature #11251]
* thread.c (rb_thread_inspect): show thread's name if set.
diff --git a/NEWS b/NEWS
index cf10aae797..eefdd005d2 100644
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,9 @@ with all sufficient information, see the ChangeLog file.
* pack/unpack (Array/String)
* j and J directives for pointer width integer type. [Feature #11215]
+* Thread
+ * Thread#name, Thread#name are added to handle thread names [Feature #11251]
+
=== Stdlib updates (outstanding ones only)
diff --git a/thread.c b/thread.c
index 5218ba7262..e59727a506 100644
--- a/thread.c
+++ b/thread.c
@@ -2719,7 +2719,7 @@ rb_thread_safe_level(VALUE thread)
* call-seq:
* thr.name -> string
*
- * Dump the name, id, and status of _thr_ to a string.
+ * show the name of the thread.
*/
static VALUE
@@ -2734,7 +2734,8 @@ rb_thread_getname(VALUE thread)
* call-seq:
* thr.name=(name) -> string
*
- * Dump the name, id, and status of _thr_ to a string.
+ * set given name to the ruby thread.
+ * On some platform, it may set the name to pthread and/or kernel.
*/
static VALUE