{"action":"created","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/2166","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/2166/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/2166/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/2166/events","html_url":"https://github.com/robolectric/robolectric/pull/2166","id":120550570,"number":2166,"title":"Scheduler enhancements","user":{"login":"kriegfrj","id":7224087,"avatar_url":"https://avatars.githubusercontent.com/u/7224087?v=3","gravatar_id":"","url":"https://api.github.com/users/kriegfrj","html_url":"https://github.com/kriegfrj","followers_url":"https://api.github.com/users/kriegfrj/followers","following_url":"https://api.github.com/users/kriegfrj/following{/other_user}","gists_url":"https://api.github.com/users/kriegfrj/gists{/gist_id}","starred_url":"https://api.github.com/users/kriegfrj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kriegfrj/subscriptions","organizations_url":"https://api.github.com/users/kriegfrj/orgs","repos_url":"https://api.github.com/users/kriegfrj/repos","events_url":"https://api.github.com/users/kriegfrj/events{/privacy}","received_events_url":"https://api.github.com/users/kriegfrj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-12-05T12:22:42Z","updated_at":"2016-02-02T10:25:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/robolectric/robolectric/pulls/2166","html_url":"https://github.com/robolectric/robolectric/pull/2166","diff_url":"https://github.com/robolectric/robolectric/pull/2166.diff","patch_url":"https://github.com/robolectric/robolectric/pull/2166.patch"},"body":"This is a branch I have created to keep track of the scheduler enhancements I have been working on. Per @charlesmunger's suggestion, I'd like to keep these on a separate branch until they have been thoroughly tested, and it was getting difficult to maintain different PRs on different branches so I have consolidated them into one branch so that they can all be tested together. I think that @charlesmunger & @jongerrish have a good codebase to test it on, hopefully they get some headspace to put these changes through their paces.\r\n\r\nFor better understanding of this PR, please refer to issue #2149.\r\n\r\nAt this point in time, the tip of this branch contains the following enhancements:\r\n\r\n* Nanosecond scheduler re-introduced (removed in #2119) and changes to `ShadowSystemClock` to avoid confusion around `setCurrentTimeMillis()` (ie, this branch also incorporates PR #2122).\r\n* AsyncTask realism & background thread operation re-introduced (also removed in #2119).\r\n* `Scheduler` class has been made fully thread-safe so that it shouldn't cause deadlocks when tasks are executed on non-main threads (this includes the changes in PR #2116, plus some more).\r\n* `Scheduler` class also enforces that it can only be controlled (ie, paused or advanced) from the main thread (see #2149 for some rationale on this).\r\n"},"comment":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/comments/178497299","html_url":"https://github.com/robolectric/robolectric/pull/2166#issuecomment-178497299","issue_url":"https://api.github.com/repos/robolectric/robolectric/issues/2166","id":178497299,"user":{"login":"karlicoss","id":291333,"avatar_url":"https://avatars.githubusercontent.com/u/291333?v=3","gravatar_id":"","url":"https://api.github.com/users/karlicoss","html_url":"https://github.com/karlicoss","followers_url":"https://api.github.com/users/karlicoss/followers","following_url":"https://api.github.com/users/karlicoss/following{/other_user}","gists_url":"https://api.github.com/users/karlicoss/gists{/gist_id}","starred_url":"https://api.github.com/users/karlicoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlicoss/subscriptions","organizations_url":"https://api.github.com/users/karlicoss/orgs","repos_url":"https://api.github.com/users/karlicoss/repos","events_url":"https://api.github.com/users/karlicoss/events{/privacy}","received_events_url":"https://api.github.com/users/karlicoss/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T10:25:08Z","updated_at":"2016-02-02T10:25:08Z","body":"@kriegfrj hey any progress?"}}