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

ruby-changes:20251

From: kosaki <ko1@a...>
Date: Thu, 30 Jun 2011 00:52:00 +0900 (JST)
Subject: [ruby-changes:20251] kosaki:r32299 (trunk): * thread.c (rb_thread_wakeup): change RDoc sample code. The old

kosaki	2011-06-30 00:51:54 +0900 (Thu, 30 Jun 2011)

  New Revision: 32299

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

  Log:
    * 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]

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32298)
+++ ChangeLog	(revision 32299)
@@ -1,3 +1,10 @@
+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
Index: thread.c
===================================================================
--- thread.c	(revision 32298)
+++ thread.c	(revision 32299)
@@ -1589,7 +1589,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>
  *

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

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