{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2400","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2400/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2400/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2400/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/2400","id":107940042,"number":2400,"title":"Fix uv_async crash (aka Option B)","user":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/Android","name":"Android","color":"5319e7"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/crash","name":"crash","color":"ff00ff"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"ljbade","id":1215089,"avatar_url":"https://avatars.githubusercontent.com/u/1215089?v=3","gravatar_id":"","url":"https://api.github.com/users/ljbade","html_url":"https://github.com/ljbade","followers_url":"https://api.github.com/users/ljbade/followers","following_url":"https://api.github.com/users/ljbade/following{/other_user}","gists_url":"https://api.github.com/users/ljbade/gists{/gist_id}","starred_url":"https://api.github.com/users/ljbade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljbade/subscriptions","organizations_url":"https://api.github.com/users/ljbade/orgs","repos_url":"https://api.github.com/users/ljbade/repos","events_url":"https://api.github.com/users/ljbade/events{/privacy}","received_events_url":"https://api.github.com/users/ljbade/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/20","html_url":"https://github.com/mapbox/mapbox-gl-native/milestones/android-v2.3.0","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/20/labels","id":1382123,"number":20,"title":"android-v2.3.0","description":"","creator":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"open_issues":74,"closed_issues":28,"state":"open","created_at":"2015-10-28T19:32:12Z","updated_at":"2015-11-03T23:48:50Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2015-09-23T15:02:26Z","updated_at":"2015-11-04T05:16:38Z","closed_at":null,"body":"While investigating #2295 @ljbade discovered that [OkHttp](http://square.github.io/okhttp/) and `uv_async` were not working properly together.  The result was the decision to ship `0.1.0` using `curl` instead.  This ticket will be about restoring OkHttp by working out [the issues with `uv_async` as documented](https://github.com/mapbox/mapbox-gl-native/issues/2295#issuecomment-142465668) by @ljbade.  Specifically:\r\n\r\n>- on curl all completed `HTTPRequest` handling happens in the same thread that creates `HTTPContext` as curl uses a loop pump to process everything (this is enforced via `MBGL_VERIFY_THREAD` macro)\r\n- on NSUrl and OkHTTP we farm `HTTPRequest` out to the system so we get the result back async on a different thread from the one that created `HTTPContext`\r\n- that is why both NSUrl and OkHTTP use `uv_async` to hand the final request processing back to the `HTTPContext` thread\r\n\r\n>So to remove `uv_async` we need an alternative way to get the request back to the `HTTPContext` thread.\r\n\r\n>I think @kkaefer will need to help us here with Option C, or he might be able to persue Option B.\r\n\r\n@incanus @ljbade @kkaefer \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/153574944","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/2400#issuecomment-153574944","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/2400","id":153574944,"user":{"login":"ljbade","id":1215089,"avatar_url":"https://avatars.githubusercontent.com/u/1215089?v=3","gravatar_id":"","url":"https://api.github.com/users/ljbade","html_url":"https://github.com/ljbade","followers_url":"https://api.github.com/users/ljbade/followers","following_url":"https://api.github.com/users/ljbade/following{/other_user}","gists_url":"https://api.github.com/users/ljbade/gists{/gist_id}","starred_url":"https://api.github.com/users/ljbade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljbade/subscriptions","organizations_url":"https://api.github.com/users/ljbade/orgs","repos_url":"https://api.github.com/users/ljbade/repos","events_url":"https://api.github.com/users/ljbade/events{/privacy}","received_events_url":"https://api.github.com/users/ljbade/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T05:16:38Z","updated_at":"2015-11-04T05:16:38Z","body":"Hmm hold on, app seems to freeze if you pan quickly then return from an activity.\r\n\r\n@kkaefer Do you mind running your :eyes: over https://github.com/mapbox/mapbox-gl-native/commit/ddd60bfa0aa359d3c87e29de6f609c1a85fb772c to check I correctly implemented the #2727 changes?\r\n"}}