[前][次][番号順一覧][スレッド一覧]

ruby-changes:20871

From: yugui <ko1@a...>
Date: Thu, 11 Aug 2011 09:39:19 +0900 (JST)
Subject: [ruby-changes:20871] yugui:r32920 (ruby_1_9_2): merges r32298,r32299,r32300 and r32301 from trunk into ruby_1_9_2.

yugui	2011-08-11 09:38:43 +0900 (Thu, 11 Aug 2011)

  New Revision: 32920

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32920

  Log:
    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@g...>. 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@g...>.
      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@g...>. 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.

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/thread.c
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 32919)
+++ ruby_1_9_2/ChangeLog	(revision 32920)
@@ -1,3 +1,29 @@
+Thu Jun 30 01:31:33 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
+
+	* 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@g...>. Thank you!
+	  [Bug #3606][ruby-core:31454]
+
+Thu Jun 30 00:49:53 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>.
+	  Thank you! [Bug #3606][ruby-core:31454]
+
+Thu Jun 30 00:43:33 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* thread.c (rb_thread_run): change RDoc. The old example is buggy
+	  and may cause deadlock. The patch is suggested by Heesob Park
+	  <phasis@g...>. Thank you! [Bug #3606][ruby-core:31454]
+
 Thu Jun 30 00:03:20 2011  Keiju Ishitsuka  <keiju@i...>
 
 	* lib/irb/completion.rb: complate correctry string literal. fix
Index: ruby_1_9_2/thread.c
===================================================================
--- ruby_1_9_2/thread.c	(revision 32919)
+++ ruby_1_9_2/thread.c	(revision 32920)
@@ -1234,20 +1234,8 @@
  *  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 @@
  *  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 @@
  *  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 @@
  *  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
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 32919)
+++ ruby_1_9_2/version.h	(revision 32920)
@@ -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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]