Goroutines: The concurrency model we wanted all along
My experience with Goroutines is that eventually you run into the limits of working with them and your code explodes in size. Your<p><pre><code>    for item := range channel {
        &#x2F;&#x2F; code goes here
    }
</code></pre>
becomes<p><pre><code>    for {
        var item Item
        var ok bool
        select {
        case &lt;-ctx.Done():
            break
        case item, ok = &lt;-channel:
            if !ok {
                break
            }
        }
 
        &#x2F;&#x2F; code goes here
    }
</code></pre>
(If you have a solution to this pattern, please do share! I would _love_ a better way.)