First reason I notice, if there's an error opening your file, wg.Done() is
never called.

On Sun, Oct 2, 2022, 1:36 PM Robert Solomon <drrob...@gmail.com> wrote:

> https://go.dev/play/p/gIVVLsiTqod
>
> I'm trying to understand concurrency, so I modified a small routine I came
> across quite a while ago.  It's a grep command, but since I have its
> source, I am trying to understand its concurrency.
> My problem is that when there are more than about 1800 files to be
> processed, the go routines all deadlock.
> This code works fine as long as I have fewer than about 1800 files to
> process.
> I don't understand why this happens.
>
> Windows 10.
> Tried w/ go1.17, go1.18 and go1.19
>
> --Rob Solomon
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/3799e520-9a98-4117-b407-f6aea24995ccn%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/3799e520-9a98-4117-b407-f6aea24995ccn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAD53Lr5MW-pkU1V_a1Pa_1GhxBtikZC%2BXxKq34dbUhxFPMNaTA%40mail.gmail.com.

Reply via email to