Re: [go-nuts] Does I/O in Goroutine blocks the underlying thread?

2024-05-31 Thread Ian Lance Taylor
On Fri, May 31, 2024 at 12:09 PM Haoyang Fan wrote: > > I was always under the impression that Go solely uses async I/O under the > hood so that when invoking a seemingly blocking call like os.File.Read the > underlying thread won't be blocked. Go scheduler will save the context of > current go

Re: [go-nuts] Does I/O in Goroutine blocks the underlying thread?

2024-05-31 Thread robert engels
It does. I think the wording is wrong - the Go routine blocks - but the carrier thread (that was running the Go routine) runs another Go routine (if needed and ready to run). > On May 31, 2024, at 2:54 AM, Haoyang Fan wrote: > > Hi everyone, > > I was always under the impression that Go solel

[go-nuts] Does I/O in Goroutine blocks the underlying thread?

2024-05-31 Thread Haoyang Fan
Hi everyone, I was always under the impression that Go solely uses async I/O under the hood so that when invoking a seemingly blocking call like os.File.Read the underlying thread won't be blocked. Go scheduler will save the context of current goroutine and schedule other goroutines to run on t

Re: [go-nuts] multiple rangefunc iterators: restart?

2024-05-31 Thread Rory Campbell-Lange
On 31/05/24, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > On 23/05/24, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > > I've been playing with with rangefunc experiment... > > ...reference to python nested yield example... > > > for p in people: > > for c in p.cars:

Re: [go-nuts] multiple rangefunc iterators: restart?

2024-05-31 Thread Rory Campbell-Lange
On 23/05/24, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > I've been playing with with rangefunc experiment... ...reference to python nested yield example... > for p in people: > for c in p.cars: > for t in c.tickets: > print("person {} in car {} g

Re: [go-nuts] Symbol of const string are not exported by compiler

2024-05-31 Thread Benoît Marguerie
Just for information, I've written an issue on go compiler to follow this evolution: https://github.com/golang/go/issues/67744 Le vendredi 31 mai 2024 à 10:15:02 UTC+2, Benoît Marguerie a écrit : > Good question ! > > But delve mainly extracts its symbols from Dwarf info. And when I try to > g

Re: [go-nuts] Symbol of const string are not exported by compiler

2024-05-31 Thread Benoît Marguerie
Good question ! But delve mainly extracts its symbols from Dwarf info. And when I try to get them with your code, I obtain this: *~/tmp$ objdump -W main | grep -i constV<2547> DW_AT_name: main.constValueInt* We can see that the compiler puts some debug tags for const int values b