On Wednesday, July 24, 2019 at 2:17:58 PM UTC-6, Burak Serdar wrote:
>
> On Wed, Jul 24, 2019 at 1:36 PM B Carr <buc...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I'm mostly interested in the degree of insulation one goroutine has from 
> another. My extensive reading indicates that absent a goroutine 
> intentionally communicating outside of itself (via a channel), that 
> whatever it does (short of making changes to globally accessible resources 
> such as a database or map) can't be seen by other goroutines. Is that a 
> correct assessment? 
>
> Not precisely. The shared resource doesn't have to be global, but 
> simply accessible from more than one goroutine. 
>
> i:=1 
> go func() { do something with i } () 
> go func() { do something else with i} () 
>
> The variable i is not global but shared between three goroutines (the 
> two, and the one that spawned the other two). Any modification done to 
> i by one goroutine has no guarantees to being seen by others unless 
> there is synchronization. 
>

Ahhhh, a subtle misunderstanding on my part. Thank you.
 

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/fb1de7ea-d4f8-416b-8936-61b6cea9388f%40googlegroups.com.

Reply via email to