{"action":"created","issue":{"url":"https://api.github.com/repos/giampaolo/psutil/issues/597","labels_url":"https://api.github.com/repos/giampaolo/psutil/issues/597/labels{/name}","comments_url":"https://api.github.com/repos/giampaolo/psutil/issues/597/comments","events_url":"https://api.github.com/repos/giampaolo/psutil/issues/597/events","html_url":"https://github.com/giampaolo/psutil/pull/597","id":58804359,"number":597,"title":"Windows: run Process.open_files() in a separate thread","user":{"login":"mrjefftang","id":1735064,"avatar_url":"https://avatars.githubusercontent.com/u/1735064?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjefftang","html_url":"https://github.com/mrjefftang","followers_url":"https://api.github.com/users/mrjefftang/followers","following_url":"https://api.github.com/users/mrjefftang/following{/other_user}","gists_url":"https://api.github.com/users/mrjefftang/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjefftang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjefftang/subscriptions","organizations_url":"https://api.github.com/users/mrjefftang/orgs","repos_url":"https://api.github.com/users/mrjefftang/repos","events_url":"https://api.github.com/users/mrjefftang/events{/privacy}","received_events_url":"https://api.github.com/users/mrjefftang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":43,"created_at":"2015-02-24T21:03:49Z","updated_at":"2015-09-11T13:13:57Z","closed_at":"2015-07-09T09:49:59Z","pull_request":{"url":"https://api.github.com/repos/giampaolo/psutil/pulls/597","html_url":"https://github.com/giampaolo/psutil/pull/597","diff_url":"https://github.com/giampaolo/psutil/pull/597.diff","patch_url":"https://github.com/giampaolo/psutil/pull/597.patch"},"body":"This PR fixes issue #340 and supersedes PR #596.\r\n\r\nThis will spawn a new thread on every call to get_open_files() and time it out after 1 second.\r\n\r\nBased off the skeleton reverse engineered code from Sysinternal's Handles here:\r\nhttp://forum.sysinternals.com/discussion-howto-enumerate-handles_topic19403_post99587.html#99587\r\n\r\nTested on Python 2.7.2 and Python 3.4.2 on Windows 7 x64.\r\n\r\nAll tests pass and the only memory leak test failures are related to net_if_addrs as seen in #596 as well.\r\n"},"comment":{"url":"https://api.github.com/repos/giampaolo/psutil/issues/comments/139542164","html_url":"https://github.com/giampaolo/psutil/pull/597#issuecomment-139542164","issue_url":"https://api.github.com/repos/giampaolo/psutil/issues/597","id":139542164,"user":{"login":"jrfl","id":5696744,"avatar_url":"https://avatars.githubusercontent.com/u/5696744?v=3","gravatar_id":"","url":"https://api.github.com/users/jrfl","html_url":"https://github.com/jrfl","followers_url":"https://api.github.com/users/jrfl/followers","following_url":"https://api.github.com/users/jrfl/following{/other_user}","gists_url":"https://api.github.com/users/jrfl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfl/subscriptions","organizations_url":"https://api.github.com/users/jrfl/orgs","repos_url":"https://api.github.com/users/jrfl/repos","events_url":"https://api.github.com/users/jrfl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfl/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T13:13:57Z","updated_at":"2015-09-11T13:13:57Z","body":"There were some leaks when mucking about looking through all processes for all open handles every 15 seconds or so.  The python process grew to over a gig in about an 2 hours.  That's one of the things that lead me to this discussion.  It turned out not to be a problem for me as I had to abandon using this code and start using handle from sysinternals and parse its output.  Handle was finding open things that psutils did not.  (Sorry if this sounds like bitching.  My windows internals skills have degraded as I haven't had to use them for years otherwise I'd attempt to help)"}}