[go-nuts] Re: genmap: Generate thread-safe, type-safe maps easily

2017-07-12 Thread ammar
It is supported via the `--rwmu` flag. On Wednesday, July 12, 2017 at 3:05:33 AM UTC-5, Rader wrote: > > I would prefer `sync.RWMutex` which allows multiple `Get` to the map. > > On Friday, June 16, 2017 at 1:26:04 PM UTC+8, am...@ammar.io wrote: >> >> https://github.com/ammario/mapgen >> >> >> Fe

[go-nuts] Re: genmap: Generate thread-safe, type-safe maps easily

2017-07-10 Thread ammar
I'm not sure it sets a good precedent adding more data structures to the language. we need generics On Sunday, July 9, 2017 at 10:23:42 PM UTC-5, Олексій Чечель wrote: > > I do not understand what prevents the authors of the language from > determining the thread-safe type *cmap*(name is taken

[go-nuts] Re: SQL query lock

2017-06-16 Thread ammar
Hello. Are you certain you're closing your rows/cancelling contexts everywhere appropriate? It would appear the block here is causing your issue. On Friday, June 16, 2017 at 1:53:46 PM UTC-5, Alexander Petro

Re: [go-nuts] genmap: Generate thread-safe, type-safe maps easily

2017-06-16 Thread ammar
sync.Map isn't type safe On Friday, June 16, 2017 at 9:38:34 AM UTC-5, Shawn Milochik wrote: > > Thanks for putting the work into this. The timing seems unfortunate, > though. How does it compare to sync.Map just announced? > > https://tip.golang.org/pkg/sync/#Map > > > -- You received this me

[go-nuts] genmap: Generate thread-safe, type-safe maps easily

2017-06-15 Thread ammar
https://github.com/ammario/mapgen Features: - Supports any key/value pair supported by Go's native maps - Allows complex operations via Lock() and Unlock() - Generated code conforms to golint and gofmt - Allows custom types - Sensible default file name and map name -- You