Created
June 15, 2020 01:08
-
-
Save pacuna/16df42557cb9fc6ee97ee2f82470ec8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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