[go-nuts] Re: go routines not being deallocated

2021-04-17 Thread Trig
Sorry, for clarification... the above should be, if you 'put something like time.Sleep(time.Second * 1) *in the go routine*...' On Sunday, April 18, 2021 at 12:32:39 AM UTC-5 Trig wrote: > Can somebody tell me why this is? It won't work on the playground; > however, put something like time.Sle

[go-nuts] go routines not being deallocated

2021-04-17 Thread Trig
Can somebody tell me why this is? It won't work on the playground; however, put something like time.Sleep(time.Second * 1) and put the last allocs in a loop... and you'll see it's literally MBs of Allocs used that never get released. What am I doing wrong, or not understanding here? I thought

[go-nuts] Is unsafe.Pointer(reflect.Value.UnsafeAddr()) safe?

2021-04-17 Thread Name No
reflect.Value.UnsafeAddr has the commence attached like that: //go:nocheckptr // This prevents inlining Value.UnsafeAddr when -d=checkptr is enabled, // which ensures cmd/compile can recognize unsafe.Pointer(v.UnsafeAddr()) // and make an exception. Seems it is saying unsafe.Pointer(reflect.Valu

[go-nuts] 9% performance loss with 1.16.3 vs. 1.15.11

2021-04-17 Thread Robert Cowart
Having read about some of the enhancements in 1.16 we were expecting perhaps a minor performance increase from 1.16. However testing has revealed performance degradation of 9% compared to 1.15. We haven't dug into this deeper yet, but I was curious if anyone else has experienced anything simila

[go-nuts] Re: encoding/xml expose line

2021-04-17 Thread peterGo
Patrick, A similar proposal has just been accepted for encoding/csv: encoding/csv: add the ability to get the line number of a record #44221 https://github.com/golang/go/issues/44221 Peter On Saturday, April 17, 2021 at 12:45:11 PM UTC-4 Patrick wrote: > I have my own programming language (a

[go-nuts] Re: encoding/xml expose line

2021-04-17 Thread Patrick
I have my own programming language (a bit similar to XSLT) and the XML can be valid but there still might be an error such as an uninitialised variable. I'd like to present feedback to the user on which line the error occurred. I am thinking about opening an issue on GitHub and providing a (sim

[go-nuts] Re: encoding/xml expose line

2021-04-17 Thread clba...@gmail.com
Don't know what you're trying to do, but the only time I've wanted the line number during decoding is when an error occurs. Then I retrieve it using xml.SyntaxError, assuming that 'error' is of type *xml.SyntaxError. On Friday, April 16, 2021 at 8:44:19 AM UTC-6 Patrick wrote: > Hello all, > >