зеркало из https://github.com/github/ruby.git
[DOC] Fix example code indentation from 3 to 2
This commit is contained in:
Родитель
3ef6364a98
Коммит
7524675330
|
@ -855,17 +855,17 @@ queue_closed_result(VALUE self, struct rb_queue *q)
|
|||
*
|
||||
* producer = Thread.new do
|
||||
* 5.times do |i|
|
||||
* sleep rand(i) # simulate expense
|
||||
* queue << i
|
||||
* puts "#{i} produced"
|
||||
* sleep rand(i) # simulate expense
|
||||
* queue << i
|
||||
* puts "#{i} produced"
|
||||
* end
|
||||
* end
|
||||
*
|
||||
* consumer = Thread.new do
|
||||
* 5.times do |i|
|
||||
* value = queue.pop
|
||||
* sleep rand(i/2) # simulate expense
|
||||
* puts "consumed #{value}"
|
||||
* value = queue.pop
|
||||
* sleep rand(i/2) # simulate expense
|
||||
* puts "consumed #{value}"
|
||||
* end
|
||||
* end
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче