goodlang / good

The Good Programming Language
BSD 3-Clause "New" or "Revised" License
29 stars 3 forks source link

Thread-safe (lock-free) maps #18

Open kirillDanshin opened 7 years ago

kirillDanshin commented 7 years ago

We want to get rid from using mutex when working with maps. We need to fix concurrent read/write in maps. To do that we need to remove throws about concurrent write/read-write, fix growWork and evacuate() and write as many as possible tests for maps.

bcmills commented 7 years ago

See also https://github.com/golang/go/issues/18177.

kirillDanshin commented 7 years ago

@bcmills thanks. glad to see that Golang team is working on this. notice, that this issue is about replacing maps to its thread-safe and lock-free implementation, so it's not about adding something, it's about fixing original implementation while saving backward compatibility. but, as you can see here, Go will not support thread-safe lock-free map implementation. but I'll do.

kirillDanshin commented 7 years ago

also, about the status of this issue. now I'm testing it in my stage and production environments, there's no data corruptions, no panics etc, so I think it's ready.

upd: when I'm done with testing, I'll push the implementation, and I should write some tests (about 50-100 should be enough).