Skip to content

Instantly share code, notes, and snippets.

@saml
Created February 15, 2013 18:50
Show Gist options
  • Save saml/4962449 to your computer and use it in GitHub Desktop.
Save saml/4962449 to your computer and use it in GitHub Desktop.
concurrent writes

Implement these:

delete(key)   
write(key, val)
get(key)

delete removes value associated with the key. If key does not exist, noop. write adds new key value if key doesn't exist, else it overwrites value associated with key. get returns value associated with key. If key does not exist, return whatever.

There will be many processes using those functions concurrently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment