summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 15:51:54 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 15:51:54 +0000
commitb3ad7b9ea14bd28606e871a6be9a7dba6201cb3d (patch)
tree86a472ce8f5689035abf66038eaf797f2349a078 /thread.c
parentb07b51f7fc03630e073ebd39006e0727e379ff71 (diff)
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 0f7bce4e1c..894c7909ea 100644
--- a/thread.c
+++ b/thread.c
@@ -1589,7 +1589,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>
*