зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
b07b51f7fc
Коммит
b3ad7b9ea1
|
@ -1,3 +1,10 @@
|
|||
Thu Jun 30 00:49:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* 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]
|
||||
|
||||
Thu Jun 30 00:43:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (rb_thread_run): change RDoc. The old example is buggy
|
||||
|
|
2
thread.c
2
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>
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче