{"action":"created","issue":{"url":"https://api.github.com/repos/libuv/libuv/issues/962","repository_url":"https://api.github.com/repos/libuv/libuv","labels_url":"https://api.github.com/repos/libuv/libuv/issues/962/labels{/name}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/962/comments","events_url":"https://api.github.com/repos/libuv/libuv/issues/962/events","html_url":"https://github.com/libuv/libuv/pull/962","id":168656310,"number":962,"title":"win: evaluate timers when system wakes up","user":{"login":"bzoz","id":17704638,"avatar_url":"https://avatars.githubusercontent.com/u/17704638?v=3","gravatar_id":"","url":"https://api.github.com/users/bzoz","html_url":"https://github.com/bzoz","followers_url":"https://api.github.com/users/bzoz/followers","following_url":"https://api.github.com/users/bzoz/following{/other_user}","gists_url":"https://api.github.com/users/bzoz/gists{/gist_id}","starred_url":"https://api.github.com/users/bzoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzoz/subscriptions","organizations_url":"https://api.github.com/users/bzoz/orgs","repos_url":"https://api.github.com/users/bzoz/repos","events_url":"https://api.github.com/users/bzoz/events{/privacy}","received_events_url":"https://api.github.com/users/bzoz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-08-01T14:16:18Z","updated_at":"2016-08-04T14:09:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/libuv/libuv/pulls/962","html_url":"https://github.com/libuv/libuv/pull/962","diff_url":"https://github.com/libuv/libuv/pull/962.diff","patch_url":"https://github.com/libuv/libuv/pull/962.patch"},"body":"When Windows resumes after sleep `GetQueuedCompletionStatus` timeout is not updated. This PR aims to fix that.\r\n\r\nFirst commit adds tracking of all created `uv_loop_t` instances. It also provides `uv_wake_all_loops` functions, which will signal all created loops. This is achieved by calling `PostQueuedCompletionStatus` with NULL as message. When `uv_wake_all_loops` is called all running `GetQueuedCompletionStatus` calls exit. In next loop iteration timeout on timers is updated to reflect time that have passed when system was asleep.\r\n\r\nSecond commit adds code to register a callback with `PowerRegisterSuspendResumeNotification`. When system resumes, this callback calls `uv_wake_all_loops`. This API however is only available since Windows 8. Unfortunately, there are no clean methods to implement this in previous Windows versions.\r\n\r\nFixes: https://github.com/nodejs/node/issues/6763\r\n"},"comment":{"url":"https://api.github.com/repos/libuv/libuv/issues/comments/237564118","html_url":"https://github.com/libuv/libuv/pull/962#issuecomment-237564118","issue_url":"https://api.github.com/repos/libuv/libuv/issues/962","id":237564118,"user":{"login":"saghul","id":317464,"avatar_url":"https://avatars.githubusercontent.com/u/317464?v=3","gravatar_id":"","url":"https://api.github.com/users/saghul","html_url":"https://github.com/saghul","followers_url":"https://api.github.com/users/saghul/followers","following_url":"https://api.github.com/users/saghul/following{/other_user}","gists_url":"https://api.github.com/users/saghul/gists{/gist_id}","starred_url":"https://api.github.com/users/saghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghul/subscriptions","organizations_url":"https://api.github.com/users/saghul/orgs","repos_url":"https://api.github.com/users/saghul/repos","events_url":"https://api.github.com/users/saghul/events{/privacy}","received_events_url":"https://api.github.com/users/saghul/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T14:09:10Z","updated_at":"2016-08-04T14:09:10Z","body":"LGTM, great work! CI: https://ci.nodejs.org/view/libuv/job/libuv-test-commit/83/"}}
{"actor":{"display_login":"saghul"}}