Skip to content

Instantly share code, notes, and snippets.

@arussellsaw
Created July 19, 2015 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arussellsaw/142087e672bae7f126b1 to your computer and use it in GitHub Desktop.
Save arussellsaw/142087e672bae7f126b1 to your computer and use it in GitHub Desktop.
type mutexMap struct {
someMap map[string]int
lock sync.Mutex
}
func main() {
mutexMap.lock.Lock()
defer mutexMap.lock.Unlock()
mutexMap.someMap["herp"] = "derp"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment