{"action":"closed","number":1950,"pull_request":{"url":"https://api.github.com/repos/OpenImageIO/oiio/pulls/1950","id":190702660,"html_url":"https://github.com/OpenImageIO/oiio/pull/1950","diff_url":"https://github.com/OpenImageIO/oiio/pull/1950.diff","patch_url":"https://github.com/OpenImageIO/oiio/pull/1950.patch","issue_url":"https://api.github.com/repos/OpenImageIO/oiio/issues/1950","number":1950,"state":"closed","locked":false,"title":"IC/TS close() and close_all() methods","user":{"login":"lgritz","id":504179,"avatar_url":"https://avatars0.githubusercontent.com/u/504179?v=4","gravatar_id":"","url":"https://api.github.com/users/lgritz","html_url":"https://github.com/lgritz","followers_url":"https://api.github.com/users/lgritz/followers","following_url":"https://api.github.com/users/lgritz/following{/other_user}","gists_url":"https://api.github.com/users/lgritz/gists{/gist_id}","starred_url":"https://api.github.com/users/lgritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgritz/subscriptions","organizations_url":"https://api.github.com/users/lgritz/orgs","repos_url":"https://api.github.com/users/lgritz/repos","events_url":"https://api.github.com/users/lgritz/events{/privacy}","received_events_url":"https://api.github.com/users/lgritz/received_events","type":"User","site_admin":false},"body":"The existing methods invalidate() and invalidate_all() fully invalidate\r\neverything the IC/TS knows about a file (or all files) -- the specs,\r\nthe pixels, etc.\r\n\r\nBut sometimes you just want to close any currently-open handles, but not\r\nnecessarily forget about what you know about those images, or any pixel\r\ntiles in the cache. That wasn't possible before, but this patch adds the\r\nfunctionality as close(filename) and close_all() methods to both IC and\r\nTS.\r\n\r\nOne interesting use case that this enables is a render-paint loop:\r\n\r\n    render();\r\n    ts->close_all();\r\n    ... here, it's ok to modify the texture files ...\r\n    ts->invalidate_all (false);\r\n    render();\r\n    ... repeat\r\n\r\nThe close_all(), performed after the render, closes any open file\r\nhandles, which is especially important on Windows where the IC holding\r\nthe file open essentially locks the files. Then, right before the\r\nnext render, invalidate_all(false) will fully invalidate any files that\r\nhave been modified since they were last opened, but not any whose\r\nmodification time has not changed.\r\n\r\nNote that the act of closing means that if additional tiles need to be\r\nread from disk, it will need to re-open the file. But as long as\r\nany pixels needed are already in the cache from last time, it may not\r\nneed to re-open at all.\r\n\r\n","created_at":"2018-05-25T22:00:48Z","updated_at":"2018-05-30T04:17:01Z","closed_at":"2018-05-30T04:17:01Z","merged_at":"2018-05-30T04:17:01Z","merge_commit_sha":"99e6599fb36037bbc7eb98c99345a3fe226aacfe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenImageIO/oiio/pulls/1950/commits","review_comments_url":"https://api.github.com/repos/OpenImageIO/oiio/pulls/1950/comments","review_comment_url":"https://api.github.com/repos/OpenImageIO/oiio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenImageIO/oiio/issues/1950/comments","statuses_url":"https://api.github.com/repos/OpenImageIO/oiio/statuses/0950b2a100a1fb05d7268a29980ef951d29b0728","head":{"label":"lgritz:lg-icclear","ref":"lg-icclear","sha":"0950b2a100a1fb05d7268a29980ef951d29b0728","user":{"login":"lgritz","id":504179,"avatar_url":"https://avatars0.githubusercontent.com/u/504179?v=4","gravatar_id":"","url":"https://api.github.com/users/lgritz","html_url":"https://github.com/lgritz","followers_url":"https://api.github.com/users/lgritz/followers","following_url":"https://api.github.com/users/lgritz/following{/other_user}","gists_url":"https://api.github.com/users/lgritz/gists{/gist_id}","starred_url":"https://api.github.com/users/lgritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgritz/subscriptions","organizations_url":"https://api.github.com/users/lgritz/orgs","repos_url":"https://api.github.com/users/lgritz/repos","events_url":"https://api.github.com/users/lgritz/events{/privacy}","received_events_url":"https://api.github.com/users/lgritz/received_events","type":"User","site_admin":false},"repo":{"id":1322330,"name":"oiio","full_name":"lgritz/oiio","owner":{"login":"lgritz","id":504179,"avatar_url":"https://avatars0.githubusercontent.com/u/504179?v=4","gravatar_id":"","url":"https://api.github.com/users/lgritz","html_url":"https://github.com/lgritz","followers_url":"https://api.github.com/users/lgritz/followers","following_url":"https://api.github.com/users/lgritz/following{/other_user}","gists_url":"https://api.github.com/users/lgritz/gists{/gist_id}","starred_url":"https://api.github.com/users/lgritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgritz/subscriptions","organizations_url":"https://api.github.com/users/lgritz/orgs","repos_url":"https://api.github.com/users/lgritz/repos","events_url":"https://api.github.com/users/lgritz/events{/privacy}","received_events_url":"https://api.github.com/users/lgritz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lgritz/oiio","description":"OpenImageIO","fork":true,"url":"https://api.github.com/repos/lgritz/oiio","forks_url":"https://api.github.com/repos/lgritz/oiio/forks","keys_url":"https://api.github.com/repos/lgritz/oiio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lgritz/oiio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lgritz/oiio/teams","hooks_url":"https://api.github.com/repos/lgritz/oiio/hooks","issue_events_url":"https://api.github.com/repos/lgritz/oiio/issues/events{/number}","events_url":"https://api.github.com/repos/lgritz/oiio/events","assignees_url":"https://api.github.com/repos/lgritz/oiio/assignees{/user}","branches_url":"https://api.github.com/repos/lgritz/oiio/branches{/branch}","tags_url":"https://api.github.com/repos/lgritz/oiio/tags","blobs_url":"https://api.github.com/repos/lgritz/oiio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lgritz/oiio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lgritz/oiio/git/refs{/sha}","trees_url":"https://api.github.com/repos/lgritz/oiio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lgritz/oiio/statuses/{sha}","languages_url":"https://api.github.com/repos/lgritz/oiio/languages","stargazers_url":"https://api.github.com/repos/lgritz/oiio/stargazers","contributors_url":"https://api.github.com/repos/lgritz/oiio/contributors","subscribers_url":"https://api.github.com/repos/lgritz/oiio/subscribers","subscription_url":"https://api.github.com/repos/lgritz/oiio/subscription","commits_url":"https://api.github.com/repos/lgritz/oiio/commits{/sha}","git_commits_url":"https://api.github.com/repos/lgritz/oiio/git/commits{/sha}","comments_url":"https://api.github.com/repos/lgritz/oiio/comments{/number}","issue_comment_url":"https://api.github.com/repos/lgritz/oiio/issues/comments{/number}","contents_url":"https://api.github.com/repos/lgritz/oiio/contents/{+path}","compare_url":"https://api.github.com/repos/lgritz/oiio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lgritz/oiio/merges","archive_url":"https://api.github.com/repos/lgritz/oiio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lgritz/oiio/downloads","issues_url":"https://api.github.com/repos/lgritz/oiio/issues{/number}","pulls_url":"https://api.github.com/repos/lgritz/oiio/pulls{/number}","milestones_url":"https://api.github.com/repos/lgritz/oiio/milestones{/number}","notifications_url":"https://api.github.com/repos/lgritz/oiio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lgritz/oiio/labels{/name}","releases_url":"https://api.github.com/repos/lgritz/oiio/releases{/id}","deployments_url":"https://api.github.com/repos/lgritz/oiio/deployments","created_at":"2011-02-02T23:16:23Z","updated_at":"2018-05-29T17:46:16Z","pushed_at":"2018-05-30T00:48:23Z","git_url":"git://github.com/lgritz/oiio.git","ssh_url":"git@github.com:lgritz/oiio.git","clone_url":"https://github.com/lgritz/oiio.git","svn_url":"https://github.com/lgritz/oiio","homepage":"http://www.openimageio.org","size":129059,"stargazers_count":4,"watchers_count":4,"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":4,"default_branch":"master"}},"base":{"label":"OpenImageIO:master","ref":"master","sha":"535f7d8df1ee12c85ac500ee2fd6b6e7bc439418","user":{"login":"OpenImageIO","id":547887,"avatar_url":"https://avatars0.githubusercontent.com/u/547887?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenImageIO","html_url":"https://github.com/OpenImageIO","followers_url":"https://api.github.com/users/OpenImageIO/followers","following_url":"https://api.github.com/users/OpenImageIO/following{/other_user}","gists_url":"https://api.github.com/users/OpenImageIO/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenImageIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenImageIO/subscriptions","organizations_url":"https://api.github.com/users/OpenImageIO/orgs","repos_url":"https://api.github.com/users/OpenImageIO/repos","events_url":"https://api.github.com/users/OpenImageIO/events{/privacy}","received_events_url":"https://api.github.com/users/OpenImageIO/received_events","type":"Organization","site_admin":false},"repo":{"id":1322284,"name":"oiio","full_name":"OpenImageIO/oiio","owner":{"login":"OpenImageIO","id":547887,"avatar_url":"https://avatars0.githubusercontent.com/u/547887?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenImageIO","html_url":"https://github.com/OpenImageIO","followers_url":"https://api.github.com/users/OpenImageIO/followers","following_url":"https://api.github.com/users/OpenImageIO/following{/other_user}","gists_url":"https://api.github.com/users/OpenImageIO/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenImageIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenImageIO/subscriptions","organizations_url":"https://api.github.com/users/OpenImageIO/orgs","repos_url":"https://api.github.com/users/OpenImageIO/repos","events_url":"https://api.github.com/users/OpenImageIO/events{/privacy}","received_events_url":"https://api.github.com/users/OpenImageIO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenImageIO/oiio","description":"OpenImageIO","fork":false,"url":"https://api.github.com/repos/OpenImageIO/oiio","forks_url":"https://api.github.com/repos/OpenImageIO/oiio/forks","keys_url":"https://api.github.com/repos/OpenImageIO/oiio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenImageIO/oiio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenImageIO/oiio/teams","hooks_url":"https://api.github.com/repos/OpenImageIO/oiio/hooks","issue_events_url":"https://api.github.com/repos/OpenImageIO/oiio/issues/events{/number}","events_url":"https://api.github.com/repos/OpenImageIO/oiio/events","assignees_url":"https://api.github.com/repos/OpenImageIO/oiio/assignees{/user}","branches_url":"https://api.github.com/repos/OpenImageIO/oiio/branches{/branch}","tags_url":"https://api.github.com/repos/OpenImageIO/oiio/tags","blobs_url":"https://api.github.com/repos/OpenImageIO/oiio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenImageIO/oiio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenImageIO/oiio/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenImageIO/oiio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenImageIO/oiio/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenImageIO/oiio/languages","stargazers_url":"https://api.github.com/repos/OpenImageIO/oiio/stargazers","contributors_url":"https://api.github.com/repos/OpenImageIO/oiio/contributors","subscribers_url":"https://api.github.com/repos/OpenImageIO/oiio/subscribers","subscription_url":"https://api.github.com/repos/OpenImageIO/oiio/subscription","commits_url":"https://api.github.com/repos/OpenImageIO/oiio/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenImageIO/oiio/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenImageIO/oiio/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenImageIO/oiio/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenImageIO/oiio/contents/{+path}","compare_url":"https://api.github.com/repos/OpenImageIO/oiio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenImageIO/oiio/merges","archive_url":"https://api.github.com/repos/OpenImageIO/oiio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenImageIO/oiio/downloads","issues_url":"https://api.github.com/repos/OpenImageIO/oiio/issues{/number}","pulls_url":"https://api.github.com/repos/OpenImageIO/oiio/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenImageIO/oiio/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenImageIO/oiio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenImageIO/oiio/labels{/name}","releases_url":"https://api.github.com/repos/OpenImageIO/oiio/releases{/id}","deployments_url":"https://api.github.com/repos/OpenImageIO/oiio/deployments","created_at":"2011-02-02T23:03:28Z","updated_at":"2018-05-29T18:36:32Z","pushed_at":"2018-05-30T04:17:01Z","git_url":"git://github.com/OpenImageIO/oiio.git","ssh_url":"git@github.com:OpenImageIO/oiio.git","clone_url":"https://github.com/OpenImageIO/oiio.git","svn_url":"https://github.com/OpenImageIO/oiio","homepage":"http://www.openimageio.org","size":128224,"stargazers_count":743,"watchers_count":743,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":309,"mirror_url":null,"archived":false,"open_issues_count":124,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":309,"open_issues":124,"watchers":743,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenImageIO/oiio/pulls/1950"},"html":{"href":"https://github.com/OpenImageIO/oiio/pull/1950"},"issue":{"href":"https://api.github.com/repos/OpenImageIO/oiio/issues/1950"},"comments":{"href":"https://api.github.com/repos/OpenImageIO/oiio/issues/1950/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenImageIO/oiio/pulls/1950/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenImageIO/oiio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenImageIO/oiio/pulls/1950/commits"},"statuses":{"href":"https://api.github.com/repos/OpenImageIO/oiio/statuses/0950b2a100a1fb05d7268a29980ef951d29b0728"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"lgritz","id":504179,"avatar_url":"https://avatars0.githubusercontent.com/u/504179?v=4","gravatar_id":"","url":"https://api.github.com/users/lgritz","html_url":"https://github.com/lgritz","followers_url":"https://api.github.com/users/lgritz/followers","following_url":"https://api.github.com/users/lgritz/following{/other_user}","gists_url":"https://api.github.com/users/lgritz/gists{/gist_id}","starred_url":"https://api.github.com/users/lgritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgritz/subscriptions","organizations_url":"https://api.github.com/users/lgritz/orgs","repos_url":"https://api.github.com/users/lgritz/repos","events_url":"https://api.github.com/users/lgritz/events{/privacy}","received_events_url":"https://api.github.com/users/lgritz/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":100,"deletions":2,"changed_files":9}}
{"actor":{"display_login":"lgritz"}}