Skip to content

Commit

Permalink
[DOC] Fix example code indentation from 3 to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
veganstraightedge authored and hsbt committed Jul 13, 2023
1 parent 3ef6364 commit 7524675
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions thread_sync.c
Expand Up @@ -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
*
Expand Down

0 comments on commit 7524675

Please sign in to comment.