On Thu, May 22, 2025 at 10:46 AM Jan Mercl <0xj...@gmail.com> wrote:
> On Thu, May 22, 2025 at 10:15 AM natxo@gmail.com
> wrote:
>
> > fatal error: all goroutines are asleep - deadlock!
>
> Something like this? https://go.dev/play/p/4mWJOZd9hgz
>
This works beautiflly, thanks! So adding the
I think need to close errCh, resCh
On Thu, May 22, 2025 at 1:44 PM natxo@gmail.com
wrote:
> hi,
>
> I do not seem to to get this one to not panic, and do not understand why
> yet.
>
> This code gets the names of files using shell globbing , so go run
> testchannels.go dir/*
>
> This gets th
hi,
I did not close the other channels, but adding this to the select code
seems to fix it:
for {
select {
case err := <-errCh:
fmt.Println(err)
case data := <-resCh:
fmt.Println("from result c
On Thu, May 22, 2025 at 10:15 AM natxo@gmail.com
wrote:
> fatal error: all goroutines are asleep - deadlock!
Something like this? https://go.dev/play/p/4mWJOZd9hgz
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this gr
hi,
I do not seem to to get this one to not panic, and do not understand why
yet.
This code gets the names of files using shell globbing , so go run
testchannels.go dir/*
This gets the name and size info of all 1000 files in the dire, but panics
at the end with a deadlock:
fatal error: all