Re: [go-nuts] mutexes, etc

2019-07-17 Thread Michael Jones
Go has an unusual (clever!) property that anything whose address “escapes” from your routine will magically be allocated on the heap _no matter if it looks like heap or local allocation. Conversely, even explicit heap allocations that don’t escape will/may be local (will up to 10 MiB). Is data

[go-nuts] mutexes, etc

2019-07-17 Thread joe mcguckin
When do you need to use mutexes? Which begs the question: When can multiple coroutines trample on memory or a variable? Doesn't each instance of a go routine get it's own stack (so, it's own local copy of local vars). It would seem that the only entities that it's possible to access from