diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-15 13:44:52 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-15 13:44:52 +0000 |
commit | 42b8a699ed4c23ff45b14a2c577a82f40fba1dfa (patch) | |
tree | 21916e4013884a46f1dd42d2692b40b1cadefd6f /thread.c | |
parent | 8588e7631eeab7fe8b91d2f2f7059144b233ad0d (diff) | |
download | ruby-42b8a699ed4c23ff45b14a2c577a82f40fba1dfa.tar.gz |
* 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].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -2142,8 +2142,11 @@ rb_thread_keys(VALUE self) * * 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,7 +2165,11 @@ rb_thread_priority(VALUE thread) * 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 |