summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-11 00:38:43 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-11 00:38:43 +0000
commited034f0c5af2ac11ee4d2d9637168a39017ec695 (patch)
treef50b16cc5d430328f27c83a4155d8879b0c7ca2c
parent301f92fe720d39a53c7cb22a31ab947cb1267afb (diff)
merges r32298,r32299,r32300 and r32301 from trunk into ruby_1_9_2.
-- * thread.c (rb_thread_run): change RDoc. The old example is buggy and may cause deadlock. The patch is suggested by Heesob Park <phasis@gmail.com>. Thank you! [Bug #3606][ruby-core:31454] -- * thread.c (rb_thread_wakeup): change RDoc sample code. The old example is buggy and may not display anything by a race. The patch is suggested by Heesob Parrk <phasis@gmail.com>. Thank you! [Bug #3606][ruby-core:31454] -- * thread.c (rb_thread_stop): change RDoc sample code. The old example is buggy and may cause deadlock. The patch is suggested by Heesob Park <phasis@gmail.com>. Thank you! [Bug #3606][ruby-core:31454] -- * thread.c (thread_s_pass): change RDoc description and remove a sample code. The actual implementaion never behave as explained by an example. It's a documentation bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@32920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog26
-rw-r--r--thread.c22
-rw-r--r--version.h2
3 files changed, 33 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 4af4c769f3..fa87ec6381 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+Thu Jun 30 01:31:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (thread_s_pass): change RDoc description and remove
+ a sample code. The actual implementaion never behave as explained by
+ an example. It's a documentation bug.
+
+Thu Jun 30 00:54:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_stop): change RDoc sample code. The old
+ example is buggy and may cause deadlock. The patch is
+ suggested by Heesob Park <phasis@gmail.com>. Thank you!
+ [Bug #3606][ruby-core:31454]
+
+Thu Jun 30 00:49:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_wakeup): change RDoc sample code. The old
+ example is buggy and may not display anything by a race.
+ The patch is suggested by Heesob Parrk <phasis@gmail.com>.
+ Thank you! [Bug #3606][ruby-core:31454]
+
+Thu Jun 30 00:43:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_run): change RDoc. The old example is buggy
+ and may cause deadlock. The patch is suggested by Heesob Park
+ <phasis@gmail.com>. Thank you! [Bug #3606][ruby-core:31454]
+
Thu Jun 30 00:03:20 2011 Keiju Ishitsuka <keiju@ishitsuka.com>
* lib/irb/completion.rb: complate correctry string literal. fix
diff --git a/thread.c b/thread.c
index 0c8c6ea463..784c3aa57b 100644
--- a/thread.c
+++ b/thread.c
@@ -1234,20 +1234,8 @@ ruby_thread_has_gvl_p(void)
* call-seq:
* Thread.pass -> nil
*
- * Invokes the thread scheduler to pass execution to another thread.
- *
- * a = Thread.new { print "a"; Thread.pass;
- * print "b"; Thread.pass;
- * print "c" }
- * b = Thread.new { print "x"; Thread.pass;
- * print "y"; Thread.pass;
- * print "z" }
- * a.join
- * b.join
- *
- * <em>produces:</em>
- *
- * axbycz
+ * Take the thrad scheduler a hint to pass execution to another thread.
+ * A running thread may or may not switch. It depend on OS and processor.
*/
static VALUE
@@ -1552,7 +1540,9 @@ rb_thread_exit(void)
* I/O, however). Does not invoke the scheduler (see <code>Thread#run</code>).
*
* c = Thread.new { Thread.stop; puts "hey!" }
+ * sleep 0.1 while c.status!='sleep'
* c.wakeup
+ * c.join
*
* <em>produces:</em>
*
@@ -1583,7 +1573,7 @@ rb_thread_wakeup(VALUE thread)
* Wakes up <i>thr</i>, making it eligible for scheduling.
*
* a = Thread.new { puts "a"; Thread.stop; puts "c" }
- * Thread.pass
+ * sleep 0.1 while a.status!='sleep'
* puts "Got here"
* a.run
* a.join
@@ -1612,7 +1602,7 @@ rb_thread_run(VALUE thread)
* and schedules execution of another thread.
*
* a = Thread.new { print "a"; Thread.stop; print "c" }
- * Thread.pass
+ * sleep 0.1 while a.status!='sleep'
* print "b"
* a.run
* a.join
diff --git a/version.h b/version.h
index 748ba34c8c..b392f92efe 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 305
+#define RUBY_PATCHLEVEL 306
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1