{"action":"created","issue":{"url":"https://api.github.com/repos/python-zk/kazoo/issues/306","labels_url":"https://api.github.com/repos/python-zk/kazoo/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/python-zk/kazoo/issues/306/comments","events_url":"https://api.github.com/repos/python-zk/kazoo/issues/306/events","html_url":"https://github.com/python-zk/kazoo/pull/306","id":66521502,"number":306,"title":"Implement read-write (shared) lock from ZooKeeper recipe.","user":{"login":"cpatulea","id":167134,"avatar_url":"https://avatars.githubusercontent.com/u/167134?v=3","gravatar_id":"","url":"https://api.github.com/users/cpatulea","html_url":"https://github.com/cpatulea","followers_url":"https://api.github.com/users/cpatulea/followers","following_url":"https://api.github.com/users/cpatulea/following{/other_user}","gists_url":"https://api.github.com/users/cpatulea/gists{/gist_id}","starred_url":"https://api.github.com/users/cpatulea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpatulea/subscriptions","organizations_url":"https://api.github.com/users/cpatulea/orgs","repos_url":"https://api.github.com/users/cpatulea/repos","events_url":"https://api.github.com/users/cpatulea/events{/privacy}","received_events_url":"https://api.github.com/users/cpatulea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-06T04:10:29Z","updated_at":"2015-04-09T16:49:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/python-zk/kazoo/pulls/306","html_url":"https://github.com/python-zk/kazoo/pull/306","diff_url":"https://github.com/python-zk/kazoo/pull/306.diff","patch_url":"https://github.com/python-zk/kazoo/pull/306.patch"},"body":"Reference: http://zookeeper.apache.org/doc/trunk/recipes.html#Shared+Locks\r\n\r\nThis is a writer-preference shared lock.\r\n\r\nMost of the lock protocol is the same as for an exclusive lock, except that it needs to be parameterized on:\r\n1) Node name - lock \"kind\" - a write lock (__lock__) or read lock (__rlock__).\r\n2) Which node names block which other node names (read locks block only writers, writers block both).\r\n3) Finding the predecessor node according to the rule in #2.\r\n\r\nThese changes are integrated to the main Lock class. The changes are backward compatible with existing users of Lock. Users should normally never pass the Lock node_name and exclude_names kwargs directly, they should use WLock and RLock."},"comment":{"url":"https://api.github.com/repos/python-zk/kazoo/issues/comments/91288565","html_url":"https://github.com/python-zk/kazoo/pull/306#issuecomment-91288565","issue_url":"https://api.github.com/repos/python-zk/kazoo/issues/306","id":91288565,"user":{"login":"harlowja","id":970458,"avatar_url":"https://avatars.githubusercontent.com/u/970458?v=3","gravatar_id":"","url":"https://api.github.com/users/harlowja","html_url":"https://github.com/harlowja","followers_url":"https://api.github.com/users/harlowja/followers","following_url":"https://api.github.com/users/harlowja/following{/other_user}","gists_url":"https://api.github.com/users/harlowja/gists{/gist_id}","starred_url":"https://api.github.com/users/harlowja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harlowja/subscriptions","organizations_url":"https://api.github.com/users/harlowja/orgs","repos_url":"https://api.github.com/users/harlowja/repos","events_url":"https://api.github.com/users/harlowja/events{/privacy}","received_events_url":"https://api.github.com/users/harlowja/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T16:49:27Z","updated_at":"2015-04-09T16:49:27Z","body":"#141 could be combined with yours; anything useful from it that u might want?"}}