{"action":"created","comment":{"url":"https://api.github.com/repos/samtools/htslib/pulls/comments/165302456","pull_request_review_id":93217187,"id":165302456,"diff_hunk":"@@ -4403,8 +4410,11 @@ int cram_set_voption(cram_fd *fd, enum hts_fmt_option opt, va_list args) {\n \tbreak;\n \n     case CRAM_OPT_RANGE:\n+\tpthread_mutex_lock(&fd->range_lock);\n \tfd->range = *va_arg(args, cram_range *);\n-\treturn cram_seek_to_refpos(fd, &fd->range);\n+\tpthread_mutex_unlock(&fd->range_lock);\n+\tint ret = cram_seek_to_refpos(fd, &fd->range);","path":"cram/cram_io.c","position":70,"original_position":70,"commit_id":"8ed1b808d10e4369e52f1e87278b3ac3bc2ad579","original_commit_id":"8ed1b808d10e4369e52f1e87278b3ac3bc2ad579","user":{"login":"jkbonfield","id":2210525,"avatar_url":"https://avatars0.githubusercontent.com/u/2210525?v=4","gravatar_id":"","url":"https://api.github.com/users/jkbonfield","html_url":"https://github.com/jkbonfield","followers_url":"https://api.github.com/users/jkbonfield/followers","following_url":"https://api.github.com/users/jkbonfield/following{/other_user}","gists_url":"https://api.github.com/users/jkbonfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbonfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbonfield/subscriptions","organizations_url":"https://api.github.com/users/jkbonfield/orgs","repos_url":"https://api.github.com/users/jkbonfield/repos","events_url":"https://api.github.com/users/jkbonfield/events{/privacy}","received_events_url":"https://api.github.com/users/jkbonfield/received_events","type":"User","site_admin":false},"body":"I don't think the race matters as we're immediately tearing down the threads anyway.  If they erroneously start reading a block that they didn't need because the range increased then it'll be short lived.  However I agree it can be simplified and will do so.","created_at":"2018-02-01T09:47:05Z","updated_at":"2018-02-01T09:47:05Z","html_url":"https://github.com/samtools/htslib/pull/655#discussion_r165302456","pull_request_url":"https://api.github.com/repos/samtools/htslib/pulls/655","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/samtools/htslib/pulls/comments/165302456"},"html":{"href":"https://github.com/samtools/htslib/pull/655#discussion_r165302456"},"pull_request":{"href":"https://api.github.com/repos/samtools/htslib/pulls/655"}},"in_reply_to_id":165120850},"pull_request":{"url":"https://api.github.com/repos/samtools/htslib/pulls/655","id":166057919,"html_url":"https://github.com/samtools/htslib/pull/655","diff_url":"https://github.com/samtools/htslib/pull/655.diff","patch_url":"https://github.com/samtools/htslib/pull/655.patch","issue_url":"https://api.github.com/repos/samtools/htslib/issues/655","number":655,"state":"open","locked":false,"title":"Mixed Cram bug fixes","user":{"login":"jkbonfield","id":2210525,"avatar_url":"https://avatars0.githubusercontent.com/u/2210525?v=4","gravatar_id":"","url":"https://api.github.com/users/jkbonfield","html_url":"https://github.com/jkbonfield","followers_url":"https://api.github.com/users/jkbonfield/followers","following_url":"https://api.github.com/users/jkbonfield/following{/other_user}","gists_url":"https://api.github.com/users/jkbonfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbonfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbonfield/subscriptions","organizations_url":"https://api.github.com/users/jkbonfield/orgs","repos_url":"https://api.github.com/users/jkbonfield/repos","events_url":"https://api.github.com/users/jkbonfield/events{/privacy}","received_events_url":"https://api.github.com/users/jkbonfield/received_events","type":"User","site_admin":false},"body":"A mish-mash of CRAM bug fixes.  Fixes #654 ","created_at":"2018-01-30T18:14:23Z","updated_at":"2018-02-01T09:47:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4f570237c9e9125d0a2251e4ce9602d215de4f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/samtools/htslib/pulls/655/commits","review_comments_url":"https://api.github.com/repos/samtools/htslib/pulls/655/comments","review_comment_url":"https://api.github.com/repos/samtools/htslib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samtools/htslib/issues/655/comments","statuses_url":"https://api.github.com/repos/samtools/htslib/statuses/8ed1b808d10e4369e52f1e87278b3ac3bc2ad579","head":{"label":"jkbonfield:ref-2","ref":"ref-2","sha":"8ed1b808d10e4369e52f1e87278b3ac3bc2ad579","user":{"login":"jkbonfield","id":2210525,"avatar_url":"https://avatars0.githubusercontent.com/u/2210525?v=4","gravatar_id":"","url":"https://api.github.com/users/jkbonfield","html_url":"https://github.com/jkbonfield","followers_url":"https://api.github.com/users/jkbonfield/followers","following_url":"https://api.github.com/users/jkbonfield/following{/other_user}","gists_url":"https://api.github.com/users/jkbonfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbonfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbonfield/subscriptions","organizations_url":"https://api.github.com/users/jkbonfield/orgs","repos_url":"https://api.github.com/users/jkbonfield/repos","events_url":"https://api.github.com/users/jkbonfield/events{/privacy}","received_events_url":"https://api.github.com/users/jkbonfield/received_events","type":"User","site_admin":false},"repo":{"id":11252497,"name":"htslib","full_name":"jkbonfield/htslib","owner":{"login":"jkbonfield","id":2210525,"avatar_url":"https://avatars0.githubusercontent.com/u/2210525?v=4","gravatar_id":"","url":"https://api.github.com/users/jkbonfield","html_url":"https://github.com/jkbonfield","followers_url":"https://api.github.com/users/jkbonfield/followers","following_url":"https://api.github.com/users/jkbonfield/following{/other_user}","gists_url":"https://api.github.com/users/jkbonfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbonfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbonfield/subscriptions","organizations_url":"https://api.github.com/users/jkbonfield/orgs","repos_url":"https://api.github.com/users/jkbonfield/repos","events_url":"https://api.github.com/users/jkbonfield/events{/privacy}","received_events_url":"https://api.github.com/users/jkbonfield/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkbonfield/htslib","description":"C library for high-throughput sequencing data formats","fork":true,"url":"https://api.github.com/repos/jkbonfield/htslib","forks_url":"https://api.github.com/repos/jkbonfield/htslib/forks","keys_url":"https://api.github.com/repos/jkbonfield/htslib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkbonfield/htslib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkbonfield/htslib/teams","hooks_url":"https://api.github.com/repos/jkbonfield/htslib/hooks","issue_events_url":"https://api.github.com/repos/jkbonfield/htslib/issues/events{/number}","events_url":"https://api.github.com/repos/jkbonfield/htslib/events","assignees_url":"https://api.github.com/repos/jkbonfield/htslib/assignees{/user}","branches_url":"https://api.github.com/repos/jkbonfield/htslib/branches{/branch}","tags_url":"https://api.github.com/repos/jkbonfield/htslib/tags","blobs_url":"https://api.github.com/repos/jkbonfield/htslib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkbonfield/htslib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkbonfield/htslib/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkbonfield/htslib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkbonfield/htslib/statuses/{sha}","languages_url":"https://api.github.com/repos/jkbonfield/htslib/languages","stargazers_url":"https://api.github.com/repos/jkbonfield/htslib/stargazers","contributors_url":"https://api.github.com/repos/jkbonfield/htslib/contributors","subscribers_url":"https://api.github.com/repos/jkbonfield/htslib/subscribers","subscription_url":"https://api.github.com/repos/jkbonfield/htslib/subscription","commits_url":"https://api.github.com/repos/jkbonfield/htslib/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkbonfield/htslib/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkbonfield/htslib/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkbonfield/htslib/issues/comments{/number}","contents_url":"https://api.github.com/repos/jkbonfield/htslib/contents/{+path}","compare_url":"https://api.github.com/repos/jkbonfield/htslib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkbonfield/htslib/merges","archive_url":"https://api.github.com/repos/jkbonfield/htslib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkbonfield/htslib/downloads","issues_url":"https://api.github.com/repos/jkbonfield/htslib/issues{/number}","pulls_url":"https://api.github.com/repos/jkbonfield/htslib/pulls{/number}","milestones_url":"https://api.github.com/repos/jkbonfield/htslib/milestones{/number}","notifications_url":"https://api.github.com/repos/jkbonfield/htslib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkbonfield/htslib/labels{/name}","releases_url":"https://api.github.com/repos/jkbonfield/htslib/releases{/id}","deployments_url":"https://api.github.com/repos/jkbonfield/htslib/deployments","created_at":"2013-07-08T11:15:05Z","updated_at":"2018-01-01T09:54:06Z","pushed_at":"2018-01-31T12:23:21Z","git_url":"git://github.com/jkbonfield/htslib.git","ssh_url":"git@github.com:jkbonfield/htslib.git","clone_url":"https://github.com/jkbonfield/htslib.git","svn_url":"https://github.com/jkbonfield/htslib","homepage":"","size":7226,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":3,"default_branch":"develop"}},"base":{"label":"samtools:develop","ref":"develop","sha":"af40c731bddaa933fe1ca5beb5cd14d7c042b10f","user":{"login":"samtools","id":1518450,"avatar_url":"https://avatars1.githubusercontent.com/u/1518450?v=4","gravatar_id":"","url":"https://api.github.com/users/samtools","html_url":"https://github.com/samtools","followers_url":"https://api.github.com/users/samtools/followers","following_url":"https://api.github.com/users/samtools/following{/other_user}","gists_url":"https://api.github.com/users/samtools/gists{/gist_id}","starred_url":"https://api.github.com/users/samtools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samtools/subscriptions","organizations_url":"https://api.github.com/users/samtools/orgs","repos_url":"https://api.github.com/users/samtools/repos","events_url":"https://api.github.com/users/samtools/events{/privacy}","received_events_url":"https://api.github.com/users/samtools/received_events","type":"Organization","site_admin":false},"repo":{"id":4339773,"name":"htslib","full_name":"samtools/htslib","owner":{"login":"samtools","id":1518450,"avatar_url":"https://avatars1.githubusercontent.com/u/1518450?v=4","gravatar_id":"","url":"https://api.github.com/users/samtools","html_url":"https://github.com/samtools","followers_url":"https://api.github.com/users/samtools/followers","following_url":"https://api.github.com/users/samtools/following{/other_user}","gists_url":"https://api.github.com/users/samtools/gists{/gist_id}","starred_url":"https://api.github.com/users/samtools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samtools/subscriptions","organizations_url":"https://api.github.com/users/samtools/orgs","repos_url":"https://api.github.com/users/samtools/repos","events_url":"https://api.github.com/users/samtools/events{/privacy}","received_events_url":"https://api.github.com/users/samtools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/samtools/htslib","description":"C library for high-throughput sequencing data formats","fork":false,"url":"https://api.github.com/repos/samtools/htslib","forks_url":"https://api.github.com/repos/samtools/htslib/forks","keys_url":"https://api.github.com/repos/samtools/htslib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samtools/htslib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samtools/htslib/teams","hooks_url":"https://api.github.com/repos/samtools/htslib/hooks","issue_events_url":"https://api.github.com/repos/samtools/htslib/issues/events{/number}","events_url":"https://api.github.com/repos/samtools/htslib/events","assignees_url":"https://api.github.com/repos/samtools/htslib/assignees{/user}","branches_url":"https://api.github.com/repos/samtools/htslib/branches{/branch}","tags_url":"https://api.github.com/repos/samtools/htslib/tags","blobs_url":"https://api.github.com/repos/samtools/htslib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samtools/htslib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samtools/htslib/git/refs{/sha}","trees_url":"https://api.github.com/repos/samtools/htslib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samtools/htslib/statuses/{sha}","languages_url":"https://api.github.com/repos/samtools/htslib/languages","stargazers_url":"https://api.github.com/repos/samtools/htslib/stargazers","contributors_url":"https://api.github.com/repos/samtools/htslib/contributors","subscribers_url":"https://api.github.com/repos/samtools/htslib/subscribers","subscription_url":"https://api.github.com/repos/samtools/htslib/subscription","commits_url":"https://api.github.com/repos/samtools/htslib/commits{/sha}","git_commits_url":"https://api.github.com/repos/samtools/htslib/git/commits{/sha}","comments_url":"https://api.github.com/repos/samtools/htslib/comments{/number}","issue_comment_url":"https://api.github.com/repos/samtools/htslib/issues/comments{/number}","contents_url":"https://api.github.com/repos/samtools/htslib/contents/{+path}","compare_url":"https://api.github.com/repos/samtools/htslib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samtools/htslib/merges","archive_url":"https://api.github.com/repos/samtools/htslib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samtools/htslib/downloads","issues_url":"https://api.github.com/repos/samtools/htslib/issues{/number}","pulls_url":"https://api.github.com/repos/samtools/htslib/pulls{/number}","milestones_url":"https://api.github.com/repos/samtools/htslib/milestones{/number}","notifications_url":"https://api.github.com/repos/samtools/htslib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samtools/htslib/labels{/name}","releases_url":"https://api.github.com/repos/samtools/htslib/releases{/id}","deployments_url":"https://api.github.com/repos/samtools/htslib/deployments","created_at":"2012-05-15T19:34:48Z","updated_at":"2018-02-01T02:25:50Z","pushed_at":"2018-01-31T12:23:22Z","git_url":"git://github.com/samtools/htslib.git","ssh_url":"git@github.com:samtools/htslib.git","clone_url":"https://github.com/samtools/htslib.git","svn_url":"https://github.com/samtools/htslib","homepage":"","size":7162,"stargazers_count":303,"watchers_count":303,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":217,"mirror_url":null,"archived":false,"open_issues_count":131,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":217,"open_issues":131,"watchers":303,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/samtools/htslib/pulls/655"},"html":{"href":"https://github.com/samtools/htslib/pull/655"},"issue":{"href":"https://api.github.com/repos/samtools/htslib/issues/655"},"comments":{"href":"https://api.github.com/repos/samtools/htslib/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/samtools/htslib/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/samtools/htslib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samtools/htslib/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/samtools/htslib/statuses/8ed1b808d10e4369e52f1e87278b3ac3bc2ad579"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jkbonfield"}}