diff --git a/context/best-practices.md b/context/best-practices.md index 833e3807..60c8a8bc 100644 --- a/context/best-practices.md +++ b/context/best-practices.md @@ -145,7 +145,7 @@ Async do |task| while chunk = socket.gets queue.push(chunk) end - end + # After this point, we won't be able to add items to the queue, and popping items will eventually result in nil once all items are dequeued: queue.close end diff --git a/guides/best-practices/readme.md b/guides/best-practices/readme.md index 47f0758f..13754b9e 100644 --- a/guides/best-practices/readme.md +++ b/guides/best-practices/readme.md @@ -168,7 +168,7 @@ Async do |task| while chunk = socket.gets queue.push(chunk) end - end + # After this point, we won't be able to add items to the queue, and popping items will eventually result in nil once all items are dequeued: queue.close end