{"action":"opened","issue":{"url":"https://api.github.com/repos/servo/servo/issues/5977","labels_url":"https://api.github.com/repos/servo/servo/issues/5977/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/5977/comments","events_url":"https://api.github.com/repos/servo/servo/issues/5977/events","html_url":"https://github.com/servo/servo/issues/5977","id":74134227,"number":5977,"title":"embedding: provide better main loop integration than cef","user":{"login":"zmike","id":234706,"avatar_url":"https://avatars.githubusercontent.com/u/234706?v=3","gravatar_id":"","url":"https://api.github.com/users/zmike","html_url":"https://github.com/zmike","followers_url":"https://api.github.com/users/zmike/followers","following_url":"https://api.github.com/users/zmike/following{/other_user}","gists_url":"https://api.github.com/users/zmike/gists{/gist_id}","starred_url":"https://api.github.com/users/zmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmike/subscriptions","organizations_url":"https://api.github.com/users/zmike/orgs","repos_url":"https://api.github.com/users/zmike/repos","events_url":"https://api.github.com/users/zmike/events{/privacy}","received_events_url":"https://api.github.com/users/zmike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-07T21:28:37Z","updated_at":"2015-05-07T21:28:37Z","closed_at":null,"body":"CEF has two methods for main loop integration: running the main loop and iterating the main loop.\r\n\r\nThis is not ideal for embedding applications since it requires them to either run the CEF main loop in another thread/process (eek) or run a timer that constantly polls on the main loop iteration function (starving the app for cpu time).\r\n\r\nServo could improve upon this in a number of ways, such as by providing a function which iterates the main loop and returns the time until the main loop should be iterated again.\r\n\r\nIdeally, an app should only iterate the browser main loop as necessary.\r\n\r\nCommence neckbearding!\r\n\r\n@glennw @pcwalton @larsbergstrom "}}