Re: [go-nuts] gc debug problem

2019-08-14 Thread sandao
escapes to heap,use "go tool compile -m". 在 2019年8月15日星期四 UTC+8下午12:06:20,Gergely Födémesi写道: > > > > On Thu, Aug 15, 2019, 05:19 sandao > > wrote: > >> In my opinion, the slice which "as" point to, is all allocated on the >> heap in two case . so, I think the mark time should not be so differe

[go-nuts] Re: What is the reason behind time.Parse using a reference time?

2019-08-14 Thread sp55aa . org
I think "2006-01-02 15:04" is a good idea, but have bad practice. you cannot understand this code directly. then it is easy to write wrong code like: time.Parse("1970-01-01 00:00", "2011-01-19 22:15") On Monday, April 14, 2014 at 9:19:29 PM UTC+8, Jean de Klerk wrote: > > In java, we do things li

Re: [go-nuts] gc debug problem

2019-08-14 Thread fgergo
On Thu, Aug 15, 2019, 05:19 sandao wrote: > In my opinion, the slice which "as" point to, is all allocated on the > heap in two case . so, I think the mark time should not be so different. > Can you tell me more details for you answer(when as is allocated on the > stack, gc has a smaller task.)?

Re: [go-nuts] gc debug problem

2019-08-14 Thread sandao
In my opinion, the slice which "as" point to, is all allocated on the heap in two case . so, I think the mark time should not be so different. Can you tell me more details for you answer(when as is allocated on the stack, gc has a smaller task.)? 在 2019年8月15日星期四 UTC+8上午11:02:46,Gergely Födémes

Re: [go-nuts] can someone guide me on where to share a few jobs available for GO-Lang Developers in CA?

2019-08-14 Thread fgergo
On Thu, Aug 15, 2019, 04:07 ARPwedding perrone wrote: > I appreciate the guidance! Thank you, Olga Leon - ol...@jbcconnect.com > - 212 355 3197 > this list is fine. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] gc debug problem

2019-08-14 Thread fgergo
.On Wed, Aug 14, 2019, 17:56 sandao wrote: > type A struct { > a int > } > > func gen() []*A { > r := make([]*A, 100) > for i := 0; i < len(r); i++ { > r[i] = &A{i} > } > return r > } > > //var as []*A = gen() > > func main() { >

[go-nuts] can someone guide me on where to share a few jobs available for GO-Lang Developers in CA?

2019-08-14 Thread ARPwedding perrone
I appreciate the guidance! Thank you, Olga Leon - ol...@jbcconnect.com - 212 355 3197 -- 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...@

Re: [go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-14 Thread Marcin Romaszewicz
Here you go: https://play.golang.org/p/_cPmaSxRatC You want to unmarshal into &A, not into &Duck This means: var duck2 A not: var duck2 Duck On Wed, Aug 14, 2019 at 8:46 AM Jochen Voss wrote: > Hello, > > I'm trying to read gob-encoded data into a variable of interface type. In > simple case

[go-nuts] gc debug problem

2019-08-14 Thread sandao
type A struct { a int } func gen() []*A { r := make([]*A, 100) for i := 0; i < len(r); i++ { r[i] = &A{i} } return r } //var as []*A = gen() func main() { go func() { err := http.ListenAndServe(":8034", nil)

[go-nuts] panic: interface conversion: interface is nil, not encoding.BinaryUnmarshaler

2019-08-14 Thread Jochen Voss
Hello, I'm trying to read gob-encoded data into a variable of interface type. In simple cases, this works for me, but when I use a custom encoding via MarshalBinary() and UnmarshalBinary() methods, my code keeps crashing, with the error message panic: interface conversion: interface is ni

[go-nuts] All goroutines are parked during bgsweep() running. Is it a issue?

2019-08-14 Thread nealhoo
Hi All I found my application has a strange issue by go trace. All goroutines are parked during bgsweep() running. Is it a issue? -- 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 i

Re: [go-nuts] Proposal: provide runtime sigprocmask api to block some signal for go runtime

2019-08-14 Thread hui zhang
thanks I found a way throungh. dynamic load so dlopen("go.so") in main function after pthread_sigmask this let go runtime start after father thread , and have the same sigmask. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Proposal: provide runtime sigprocmask api to block some signal for go runtime

2019-08-14 Thread 'Jim Idle' via golang-nuts
*Note that you must not use sigprocmask in multi-threaded processes, because each thread has its own signal mask and there is no single process signal mask. According to POSIX, the behavior of sigprocmask in a multi-threaded process is “unspecified”. * There is a lot more to signal handling than s