Skip to content

Instantly share code, notes, and snippets.

@pacuna
Created June 15, 2020 01:08
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 pacuna/16df42557cb9fc6ee97ee2f82470ec8a to your computer and use it in GitHub Desktop.
Save pacuna/16df42557cb9fc6ee97ee2f82470ec8a to your computer and use it in GitHub Desktop.
type node struct {
mu sync.Mutex
item []byte
key uint64
next *node
}
func (n *node) lock() {
n.mu.Lock()
}
func (n *node) unlock() {
n.mu.Unlock()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment