{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/facebookgo/inmem/pulls/1","id":109152905,"html_url":"https://github.com/facebookgo/inmem/pull/1","diff_url":"https://github.com/facebookgo/inmem/pull/1.diff","patch_url":"https://github.com/facebookgo/inmem/pull/1.patch","issue_url":"https://api.github.com/repos/facebookgo/inmem/issues/1","number":1,"state":"open","locked":false,"title":"Added a RWMutex to replace the straight Mutex","user":{"login":"jamesbibby","id":620327,"avatar_url":"https://avatars3.githubusercontent.com/u/620327?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesbibby","html_url":"https://github.com/jamesbibby","followers_url":"https://api.github.com/users/jamesbibby/followers","following_url":"https://api.github.com/users/jamesbibby/following{/other_user}","gists_url":"https://api.github.com/users/jamesbibby/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesbibby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesbibby/subscriptions","organizations_url":"https://api.github.com/users/jamesbibby/orgs","repos_url":"https://api.github.com/users/jamesbibby/repos","events_url":"https://api.github.com/users/jamesbibby/events{/privacy}","received_events_url":"https://api.github.com/users/jamesbibby/received_events","type":"User","site_admin":false},"body":"I'm interested to see what you think of these additions.    I thought a RWMutex might make more sense here.  this is just a start, and there are questions but I thought I would check it with you before proceeded to clean things up.\r\n\r\n- Added a RWMutex\r\n- One concern would be the removal of the expired element during a read.   Given that this is a non-element (for the purposes of the cache as it has expired) this may not be a terrible thing to do with a read lock.   Alternatively this could be deferred or done asynchronously and have it acquire a Write lock before removing.\r\n- Added some benchmarks.   They need some more work, perhaps comparing between the RWMutex vs. Mutex","created_at":"2017-03-05T15:41:53Z","updated_at":"2017-03-05T15:41:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebookgo/inmem/pulls/1/commits","review_comments_url":"https://api.github.com/repos/facebookgo/inmem/pulls/1/comments","review_comment_url":"https://api.github.com/repos/facebookgo/inmem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebookgo/inmem/issues/1/comments","statuses_url":"https://api.github.com/repos/facebookgo/inmem/statuses/d2c13c145066383dbef49a7d044e35bf169fa4bc","head":{"label":"jamesbibby:add-rwmutex","ref":"add-rwmutex","sha":"d2c13c145066383dbef49a7d044e35bf169fa4bc","user":{"login":"jamesbibby","id":620327,"avatar_url":"https://avatars3.githubusercontent.com/u/620327?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesbibby","html_url":"https://github.com/jamesbibby","followers_url":"https://api.github.com/users/jamesbibby/followers","following_url":"https://api.github.com/users/jamesbibby/following{/other_user}","gists_url":"https://api.github.com/users/jamesbibby/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesbibby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesbibby/subscriptions","organizations_url":"https://api.github.com/users/jamesbibby/orgs","repos_url":"https://api.github.com/users/jamesbibby/repos","events_url":"https://api.github.com/users/jamesbibby/events{/privacy}","received_events_url":"https://api.github.com/users/jamesbibby/received_events","type":"User","site_admin":false},"repo":{"id":83977040,"name":"inmem","full_name":"jamesbibby/inmem","owner":{"login":"jamesbibby","id":620327,"avatar_url":"https://avatars3.githubusercontent.com/u/620327?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesbibby","html_url":"https://github.com/jamesbibby","followers_url":"https://api.github.com/users/jamesbibby/followers","following_url":"https://api.github.com/users/jamesbibby/following{/other_user}","gists_url":"https://api.github.com/users/jamesbibby/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesbibby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesbibby/subscriptions","organizations_url":"https://api.github.com/users/jamesbibby/orgs","repos_url":"https://api.github.com/users/jamesbibby/repos","events_url":"https://api.github.com/users/jamesbibby/events{/privacy}","received_events_url":"https://api.github.com/users/jamesbibby/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamesbibby/inmem","description":"Package inmem provides an in memory LRU cache with TTL support.","fork":true,"url":"https://api.github.com/repos/jamesbibby/inmem","forks_url":"https://api.github.com/repos/jamesbibby/inmem/forks","keys_url":"https://api.github.com/repos/jamesbibby/inmem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamesbibby/inmem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamesbibby/inmem/teams","hooks_url":"https://api.github.com/repos/jamesbibby/inmem/hooks","issue_events_url":"https://api.github.com/repos/jamesbibby/inmem/issues/events{/number}","events_url":"https://api.github.com/repos/jamesbibby/inmem/events","assignees_url":"https://api.github.com/repos/jamesbibby/inmem/assignees{/user}","branches_url":"https://api.github.com/repos/jamesbibby/inmem/branches{/branch}","tags_url":"https://api.github.com/repos/jamesbibby/inmem/tags","blobs_url":"https://api.github.com/repos/jamesbibby/inmem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamesbibby/inmem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamesbibby/inmem/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamesbibby/inmem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamesbibby/inmem/statuses/{sha}","languages_url":"https://api.github.com/repos/jamesbibby/inmem/languages","stargazers_url":"https://api.github.com/repos/jamesbibby/inmem/stargazers","contributors_url":"https://api.github.com/repos/jamesbibby/inmem/contributors","subscribers_url":"https://api.github.com/repos/jamesbibby/inmem/subscribers","subscription_url":"https://api.github.com/repos/jamesbibby/inmem/subscription","commits_url":"https://api.github.com/repos/jamesbibby/inmem/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamesbibby/inmem/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamesbibby/inmem/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamesbibby/inmem/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamesbibby/inmem/contents/{+path}","compare_url":"https://api.github.com/repos/jamesbibby/inmem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamesbibby/inmem/merges","archive_url":"https://api.github.com/repos/jamesbibby/inmem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamesbibby/inmem/downloads","issues_url":"https://api.github.com/repos/jamesbibby/inmem/issues{/number}","pulls_url":"https://api.github.com/repos/jamesbibby/inmem/pulls{/number}","milestones_url":"https://api.github.com/repos/jamesbibby/inmem/milestones{/number}","notifications_url":"https://api.github.com/repos/jamesbibby/inmem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamesbibby/inmem/labels{/name}","releases_url":"https://api.github.com/repos/jamesbibby/inmem/releases{/id}","deployments_url":"https://api.github.com/repos/jamesbibby/inmem/deployments","created_at":"2017-03-05T14:40:04Z","updated_at":"2017-03-05T14:40:06Z","pushed_at":"2017-03-05T15:40:42Z","git_url":"git://github.com/jamesbibby/inmem.git","ssh_url":"git@github.com:jamesbibby/inmem.git","clone_url":"https://github.com/jamesbibby/inmem.git","svn_url":"https://github.com/jamesbibby/inmem","homepage":"https://godoc.org/github.com/facebookgo/inmem","size":5,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebookgo:master","ref":"master","sha":"12ecd81f72765d005682e0fdbe5be0fbe59e8793","user":{"login":"facebookgo","id":6497226,"avatar_url":"https://avatars1.githubusercontent.com/u/6497226?v=3","gravatar_id":"","url":"https://api.github.com/users/facebookgo","html_url":"https://github.com/facebookgo","followers_url":"https://api.github.com/users/facebookgo/followers","following_url":"https://api.github.com/users/facebookgo/following{/other_user}","gists_url":"https://api.github.com/users/facebookgo/gists{/gist_id}","starred_url":"https://api.github.com/users/facebookgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebookgo/subscriptions","organizations_url":"https://api.github.com/users/facebookgo/orgs","repos_url":"https://api.github.com/users/facebookgo/repos","events_url":"https://api.github.com/users/facebookgo/events{/privacy}","received_events_url":"https://api.github.com/users/facebookgo/received_events","type":"Organization","site_admin":false},"repo":{"id":52553373,"name":"inmem","full_name":"facebookgo/inmem","owner":{"login":"facebookgo","id":6497226,"avatar_url":"https://avatars1.githubusercontent.com/u/6497226?v=3","gravatar_id":"","url":"https://api.github.com/users/facebookgo","html_url":"https://github.com/facebookgo","followers_url":"https://api.github.com/users/facebookgo/followers","following_url":"https://api.github.com/users/facebookgo/following{/other_user}","gists_url":"https://api.github.com/users/facebookgo/gists{/gist_id}","starred_url":"https://api.github.com/users/facebookgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebookgo/subscriptions","organizations_url":"https://api.github.com/users/facebookgo/orgs","repos_url":"https://api.github.com/users/facebookgo/repos","events_url":"https://api.github.com/users/facebookgo/events{/privacy}","received_events_url":"https://api.github.com/users/facebookgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebookgo/inmem","description":"Package inmem provides an in memory LRU cache with TTL support.","fork":false,"url":"https://api.github.com/repos/facebookgo/inmem","forks_url":"https://api.github.com/repos/facebookgo/inmem/forks","keys_url":"https://api.github.com/repos/facebookgo/inmem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebookgo/inmem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebookgo/inmem/teams","hooks_url":"https://api.github.com/repos/facebookgo/inmem/hooks","issue_events_url":"https://api.github.com/repos/facebookgo/inmem/issues/events{/number}","events_url":"https://api.github.com/repos/facebookgo/inmem/events","assignees_url":"https://api.github.com/repos/facebookgo/inmem/assignees{/user}","branches_url":"https://api.github.com/repos/facebookgo/inmem/branches{/branch}","tags_url":"https://api.github.com/repos/facebookgo/inmem/tags","blobs_url":"https://api.github.com/repos/facebookgo/inmem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebookgo/inmem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebookgo/inmem/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebookgo/inmem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebookgo/inmem/statuses/{sha}","languages_url":"https://api.github.com/repos/facebookgo/inmem/languages","stargazers_url":"https://api.github.com/repos/facebookgo/inmem/stargazers","contributors_url":"https://api.github.com/repos/facebookgo/inmem/contributors","subscribers_url":"https://api.github.com/repos/facebookgo/inmem/subscribers","subscription_url":"https://api.github.com/repos/facebookgo/inmem/subscription","commits_url":"https://api.github.com/repos/facebookgo/inmem/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebookgo/inmem/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebookgo/inmem/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebookgo/inmem/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebookgo/inmem/contents/{+path}","compare_url":"https://api.github.com/repos/facebookgo/inmem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebookgo/inmem/merges","archive_url":"https://api.github.com/repos/facebookgo/inmem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebookgo/inmem/downloads","issues_url":"https://api.github.com/repos/facebookgo/inmem/issues{/number}","pulls_url":"https://api.github.com/repos/facebookgo/inmem/pulls{/number}","milestones_url":"https://api.github.com/repos/facebookgo/inmem/milestones{/number}","notifications_url":"https://api.github.com/repos/facebookgo/inmem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebookgo/inmem/labels{/name}","releases_url":"https://api.github.com/repos/facebookgo/inmem/releases{/id}","deployments_url":"https://api.github.com/repos/facebookgo/inmem/deployments","created_at":"2016-02-25T20:08:12Z","updated_at":"2017-03-02T00:43:05Z","pushed_at":"2016-02-25T20:08:20Z","git_url":"git://github.com/facebookgo/inmem.git","ssh_url":"git@github.com:facebookgo/inmem.git","clone_url":"https://github.com/facebookgo/inmem.git","svn_url":"https://github.com/facebookgo/inmem","homepage":"https://godoc.org/github.com/facebookgo/inmem","size":3,"stargazers_count":40,"watchers_count":40,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebookgo/inmem/pulls/1"},"html":{"href":"https://github.com/facebookgo/inmem/pull/1"},"issue":{"href":"https://api.github.com/repos/facebookgo/inmem/issues/1"},"comments":{"href":"https://api.github.com/repos/facebookgo/inmem/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/facebookgo/inmem/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/facebookgo/inmem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebookgo/inmem/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/facebookgo/inmem/statuses/d2c13c145066383dbef49a7d044e35bf169fa4bc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":137,"deletions":5,"changed_files":2}}
{"actor":{"display_login":"jamesbibby"}}