Re: [go-nuts] [NEWBIE] syncmap - how to use it correctly

2018-04-13 Thread vadim kulibaba
Wow, thank you, Jan пятница, 13 апреля 2018 г., 15:43:51 UTC+3 пользователь Jan Mercl написал: > > On Fri, Apr 13, 2018 at 2:29 PM > > wrote: > > > What i do wrong? > > The code relies on the bool value in 'ok', returned from .Load(), but that > _does not_ mean some other goroutine, once you re

Re: [go-nuts] [NEWBIE] syncmap - how to use it correctly

2018-04-13 Thread Jan Mercl
On Fri, Apr 13, 2018 at 2:29 PM wrote: > What i do wrong? The code relies on the bool value in 'ok', returned from .Load(), but that _does not_ mean some other goroutine, once you remove the mutex.Lock(), cannot insert a value for the same key the moment the call of .Load() returned. -- -j -