Re: [go-nuts] Map and slice are also concurrency-unsafe data structures. Why is map designed to throw a fatal that cannot be recovered when there is a concurrency conflict, but slice does not have any

2023-06-02 Thread fliter
Thank you for your perfect answer 在2023年6月2日星期五 UTC+8 23:47:14 写道: > On Fri, Jun 2, 2023 at 4:59 AM fliter wrote: > > > > Map and slice are also concurrency-unsafe data structures. Why is map > designed to throw a fatal that cannot be recovered when there is a > concurrency conflict, but slice

[go-nuts] Re: Map and slice are also concurrency-unsafe data structures. Why is map designed to throw a fatal that cannot be recovered when there is a concurrency conflict, but slice does not have any

2023-06-02 Thread fliter
Thank you for your perfect answer 在2023年6月2日星期五 UTC+8 20:50:57 写道: > Is it actually "designed" to do that? I think it just crashes when the map > data structure is in a corrupted state, because of concurrent updates. > > In principle, you may be able to get a panic when updating a slice > concu

[go-nuts] Understanding go garbage collector

2023-06-02 Thread Ilya
I am trying to dive deeper into golang and started looking at golang GC implementation. I have read the article and try to wrap my head around it. Lets look at the Reasoning

Re: [go-nuts] Map and slice are also concurrency-unsafe data structures. Why is map designed to throw a fatal that cannot be recovered when there is a concurrency conflict, but slice does not have any

2023-06-02 Thread Ian Lance Taylor
On Fri, Jun 2, 2023 at 4:59 AM fliter wrote: > > Map and slice are also concurrency-unsafe data structures. Why is map > designed to throw a fatal that cannot be recovered when there is a > concurrency conflict, but slice does not have any prompt? Are there any > design considerations? Because

[go-nuts] Gorm DBresolver

2023-06-02 Thread harmil sanghavi
hello guys, i am stuck in Dbresolver that how it acutally use. so please let me help out -- 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...@g

[go-nuts] Re: Map and slice are also concurrency-unsafe data structures. Why is map designed to throw a fatal that cannot be recovered when there is a concurrency conflict, but slice does not have any

2023-06-02 Thread Brian Candler
Is it actually "designed" to do that? I think it just crashes when the map data structure is in a corrupted state, because of concurrent updates. In principle, you may be able to get a panic when updating a slice concurrently, but it's much rarer. That's because a slice allocates a contiguous a

[go-nuts] Map and slice are also concurrency-unsafe data structures. Why is map designed to throw a fatal that cannot be recovered when there is a concurrency conflict, but slice does not have any pro

2023-06-02 Thread fliter
Map and slice are also concurrency-unsafe data structures. Why is map designed to throw a fatal that cannot be recovered when there is a concurrency conflict, but slice does not have any prompt? Are there any design considerations? Thanks! -- You received this message because you are subscrib