{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/glow/issues/2154","repository_url":"https://api.github.com/repos/pytorch/glow","labels_url":"https://api.github.com/repos/pytorch/glow/issues/2154/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/glow/issues/2154/comments","events_url":"https://api.github.com/repos/pytorch/glow/issues/2154/events","html_url":"https://github.com/pytorch/glow/pull/2154","id":389535885,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NTA0NzYx","number":2154,"title":"[Support] switch from std::function to std::packaged_task in ThreadPool","user":{"login":"nickgg","id":701287,"node_id":"MDQ6VXNlcjcwMTI4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/701287?v=4","gravatar_id":"","url":"https://api.github.com/users/nickgg","html_url":"https://github.com/nickgg","followers_url":"https://api.github.com/users/nickgg/followers","following_url":"https://api.github.com/users/nickgg/following{/other_user}","gists_url":"https://api.github.com/users/nickgg/gists{/gist_id}","starred_url":"https://api.github.com/users/nickgg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickgg/subscriptions","organizations_url":"https://api.github.com/users/nickgg/orgs","repos_url":"https://api.github.com/users/nickgg/repos","events_url":"https://api.github.com/users/nickgg/events{/privacy}","received_events_url":"https://api.github.com/users/nickgg/received_events","type":"User","site_admin":false},"labels":[{"id":706497924,"node_id":"MDU6TGFiZWw3MDY0OTc5MjQ=","url":"https://api.github.com/repos/pytorch/glow/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-12-10T23:44:51Z","updated_at":"2018-12-18T21:57:59Z","closed_at":"2018-12-11T18:37:09Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pytorch/glow/pulls/2154","html_url":"https://github.com/pytorch/glow/pull/2154","diff_url":"https://github.com/pytorch/glow/pull/2154.diff","patch_url":"https://github.com/pytorch/glow/pull/2154.patch"},"body":"*Description*: The ThreadPool is storing tasks as std::functions which prevents using move only types in the lambda capture. std::packaged_task is a better abstraction for one time run lambdas and does not have this limitation. We'll have to monitor performance of the thread pool as we scale up.\r\n*Testing*: ninja test, but especially two new ThreadPool tests - one which verifies move-only captures, and another which demonstrates we can use the packaged_tasks's included future to tell when the task has executed.\r\n*Documentation*: n/a"},"comment":{"url":"https://api.github.com/repos/pytorch/glow/issues/comments/448386028","html_url":"https://github.com/pytorch/glow/pull/2154#issuecomment-448386028","issue_url":"https://api.github.com/repos/pytorch/glow/issues/2154","id":448386028,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODM4NjAyOA==","user":{"login":"nadavrot","id":8635342,"node_id":"MDQ6VXNlcjg2MzUzNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/8635342?v=4","gravatar_id":"","url":"https://api.github.com/users/nadavrot","html_url":"https://github.com/nadavrot","followers_url":"https://api.github.com/users/nadavrot/followers","following_url":"https://api.github.com/users/nadavrot/following{/other_user}","gists_url":"https://api.github.com/users/nadavrot/gists{/gist_id}","starred_url":"https://api.github.com/users/nadavrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadavrot/subscriptions","organizations_url":"https://api.github.com/users/nadavrot/orgs","repos_url":"https://api.github.com/users/nadavrot/repos","events_url":"https://api.github.com/users/nadavrot/events{/privacy}","received_events_url":"https://api.github.com/users/nadavrot/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T21:57:59Z","updated_at":"2018-12-18T21:57:59Z","author_association":"CONTRIBUTOR","body":"@ayermolo I wonder if porting the interface to using llvm's function_ref could solve the problem.\r\n\r\nhttps://llvm.org/docs/ProgrammersManual.html#the-function-ref-class-template\r\n"}}
{"actor":{"display_login":"nadavrot"}}