Created
September 17, 2014 16:35
-
-
Save anandkunal/e61a10c1cd071a07af13 to your computer and use it in GitHub Desktop.
This file contains 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
func (r *RPC) Put(item *CacheItem, ack *bool) error { | |
r.mu.Lock() | |
defer r.mu.Unlock() | |
r.cache[item.Key] = item.Value | |
*ack = true | |
r.requests.Put++ | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment