{"action":"created","issue":{"url":"https://api.github.com/repos/dpc/mioco/issues/95","repository_url":"https://api.github.com/repos/dpc/mioco","labels_url":"https://api.github.com/repos/dpc/mioco/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/dpc/mioco/issues/95/comments","events_url":"https://api.github.com/repos/dpc/mioco/issues/95/events","html_url":"https://github.com/dpc/mioco/issues/95","id":135063383,"number":95,"title":"Spurious wakeup every 1000ms","user":{"login":"sp3d","id":4684824,"avatar_url":"https://avatars.githubusercontent.com/u/4684824?v=3","gravatar_id":"","url":"https://api.github.com/users/sp3d","html_url":"https://github.com/sp3d","followers_url":"https://api.github.com/users/sp3d/followers","following_url":"https://api.github.com/users/sp3d/following{/other_user}","gists_url":"https://api.github.com/users/sp3d/gists{/gist_id}","starred_url":"https://api.github.com/users/sp3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sp3d/subscriptions","organizations_url":"https://api.github.com/users/sp3d/orgs","repos_url":"https://api.github.com/users/sp3d/repos","events_url":"https://api.github.com/users/sp3d/events{/privacy}","received_events_url":"https://api.github.com/users/sp3d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-20T11:37:01Z","updated_at":"2016-02-21T00:01:09Z","closed_at":null,"body":"At lib.rs:669 (`Mioco::thread_loop`), Mioco unconditionally passes a timeout of `Some(1000)` to `event_loop.run_once`. This causes a wakeup every second, regardless of whether it's needed. There isn't any comment stating why a timeout is passed, and in my application it seems unnecessary based on testing with mioco patched to pass `None` there.\r\n\r\nIf I understand properly, there should be no reason to use a timeout since Mioco timers will produce an event when they go off. On the other hand, if there *is* something in the design of Mioco that necessitates waking up periodically, 1000ms seems like a hard interval to justify, and there should be a knob for this timeout for applications to tune."},"comment":{"url":"https://api.github.com/repos/dpc/mioco/issues/comments/186705590","html_url":"https://github.com/dpc/mioco/issues/95#issuecomment-186705590","issue_url":"https://api.github.com/repos/dpc/mioco/issues/95","id":186705590,"user":{"login":"dpc","id":9209,"avatar_url":"https://avatars.githubusercontent.com/u/9209?v=3","gravatar_id":"","url":"https://api.github.com/users/dpc","html_url":"https://github.com/dpc","followers_url":"https://api.github.com/users/dpc/followers","following_url":"https://api.github.com/users/dpc/following{/other_user}","gists_url":"https://api.github.com/users/dpc/gists{/gist_id}","starred_url":"https://api.github.com/users/dpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpc/subscriptions","organizations_url":"https://api.github.com/users/dpc/orgs","repos_url":"https://api.github.com/users/dpc/repos","events_url":"https://api.github.com/users/dpc/events{/privacy}","received_events_url":"https://api.github.com/users/dpc/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T00:01:09Z","updated_at":"2016-02-21T00:01:09Z","body":"I have it on my radar. I hopped no one is going to notice before it's fixed. :D . That was the original mio behavior - call `Handler::tick()` at least once a second.\r\n\r\nThe only reason it's there is to notice where whole mioco instance should shutdown. This needs to be changed to use notification (`Message`)."}}