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

ruby-changes:15452

From: mame <ko1@a...>
Date: Thu, 15 Apr 2010 22:45:14 +0900 (JST)
Subject: [ruby-changes:15452] Ruby:r27351 (trunk): * thread.c (rb_thread_priority, rb_thread_priority_set): fix rdoc.

mame	2010-04-15 22:44:52 +0900 (Thu, 15 Apr 2010)

  New Revision: 27351

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

  Log:
    * thread.c (rb_thread_priority, rb_thread_priority_set): fix rdoc.
      Lower-priority thread may run even if there are higher-priority
      threads.  See [ruby-dev:40977].

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27350)
+++ ChangeLog	(revision 27351)
@@ -1,3 +1,9 @@
+Thu Apr 15 22:41:47 2010  Yusuke Endoh  <mame@t...>
+
+	* thread.c (rb_thread_priority, rb_thread_priority_set): fix rdoc.
+	  Lower-priority thread may run even if there are higher-priority
+	  threads.  See [ruby-dev:40977].
+
 Thu Apr 15 22:33:35 2010  Yusuke Endoh  <mame@t...>
 
 	* lib/uri/ftp.rb (URI::FTP#set_path): added to correct handling of
Index: thread.c
===================================================================
--- thread.c	(revision 27350)
+++ thread.c	(revision 27351)
@@ -2142,9 +2142,12 @@
  *
  *  Returns the priority of <i>thr</i>. Default is inherited from the
  *  current thread which creating the new thread, or zero for the
- *  initial main thread; higher-priority threads will run before
- *  lower-priority threads.
+ *  initial main thread; higher-priority thread will run more frequently
+ *  than lower-priority threads (but lower-priority threads can also run).
  *
+ *  This is just hint for Ruby thread scheduler.  It may be ignored on some
+ *  platform.
+ *
  *     Thread.current.priority   #=> 0
  */
 
@@ -2162,8 +2165,12 @@
  *     thr.priority= integer   => thr
  *
  *  Sets the priority of <i>thr</i> to <i>integer</i>. Higher-priority threads
- *  will run before lower-priority threads.
+ *  will run more frequently than lower-priority threads (but lower-priority
+ *  threads can also run).
  *
+ *  This is just hint for Ruby thread scheduler.  It may be ignored on some
+ *  platform.
+ *
  *     count1 = count2 = 0
  *     a = Thread.new do
  *           loop { count1 += 1 }

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

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