{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/7020","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/7020/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/7020/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/7020/events","html_url":"https://github.com/xbmc/xbmc/pull/7020","id":71222039,"number":7020,"title":"[pvr] finally make it possible to use multiple PVR clients","user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Fix","name":"Fix","color":"0b02e1"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/Improvement","name":"Improvement","color":"0b02e1"},{"url":"https://api.github.com/repos/xbmc/xbmc/labels/PVR","name":"PVR","color":"009800"}],"state":"open","locked":true,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-04-27T08:46:26Z","updated_at":"2016-01-25T14:09:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/7020","html_url":"https://github.com/xbmc/xbmc/pull/7020","diff_url":"https://github.com/xbmc/xbmc/pull/7020.diff","patch_url":"https://github.com/xbmc/xbmc/pull/7020.patch"},"body":"I've grown tired of telling users that it's not possible to use more than one addon at a time due to a bug, so this is my attempt at fixing it. We really need a solution for this for Isengard so I'd appreciate it if we can keep the bikeshedding to a minimum and focus on getting something that works done, even though the solution might not be the prettiest.\r\n\r\nThe problem:\r\n* the addons are started by `CPVRClients` on a background thread. Meanwhile, `CPVRManager` used a simple sleep loop while waiting for at least one addon to load before continuing. If the second (or third) addon didn't load during the same 50 millisecond sleep duration, the startup would continue with just one addon.\r\n\r\nThe solution:\r\n* use a boolean in `CPVRClients` to indicate whether all clients have been loaded or not. From `CPVRManager` we call a method which blocks until this boolean's condition variable is signaled.\r\n\r\nPing @opdenkamp @ksooo @xhaggi @FernetMenta\r\n\r\nI'm not convinced this is the ultimate solution, but at least it works and it doesn't introduce arbitrary sleep durations."},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/174518637","html_url":"https://github.com/xbmc/xbmc/pull/7020#issuecomment-174518637","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/7020","id":174518637,"user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T14:09:17Z","updated_at":"2016-01-25T14:09:17Z","body":"Added some fixups, squashed the last [squash] commit.\r\n\r\njenkins build this please"}}