{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2929","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2929/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2929/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2929/events","html_url":"https://github.com/ReactiveX/RxJava/pull/2929","id":72318759,"number":2929,"title":"OperatorObserveOn onComplete can be emitted despite onError being called","user":{"login":"davidmoten","id":318187,"avatar_url":"https://avatars.githubusercontent.com/u/318187?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmoten","html_url":"https://github.com/davidmoten","followers_url":"https://api.github.com/users/davidmoten/followers","following_url":"https://api.github.com/users/davidmoten/following{/other_user}","gists_url":"https://api.github.com/users/davidmoten/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmoten/subscriptions","organizations_url":"https://api.github.com/users/davidmoten/orgs","repos_url":"https://api.github.com/users/davidmoten/repos","events_url":"https://api.github.com/users/davidmoten/events{/privacy}","received_events_url":"https://api.github.com/users/davidmoten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-05-01T00:26:33Z","updated_at":"2015-05-04T08:14:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/2929","html_url":"https://github.com/ReactiveX/RxJava/pull/2929","diff_url":"https://github.com/ReactiveX/RxJava/pull/2929.diff","patch_url":"https://github.com/ReactiveX/RxJava/pull/2929.patch"},"body":"This is a fix for a race condition in `OperatorObserveOn` where if thread A gets to L164 and thread B starts the pollQueue loop then it will act as if the stream had completed normally instead of with an error. \r\n\r\nThe effect is that a stream could appear to complete normally when in fact an error had occurred.\r\n\r\nUsing two boolean volatiles `completed` and `failed` that as a pair were not atomically updated/read exposed us to this race condition. \r\n\r\nThe fix is to use a single volatile integer `status` to represent the  states ACTIVE, COMPLETED, ERRORED to replace `completed` and `failed`.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/98625400","html_url":"https://github.com/ReactiveX/RxJava/pull/2929#issuecomment-98625400","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/2929","id":98625400,"user":{"login":"davidmoten","id":318187,"avatar_url":"https://avatars.githubusercontent.com/u/318187?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmoten","html_url":"https://github.com/davidmoten","followers_url":"https://api.github.com/users/davidmoten/followers","following_url":"https://api.github.com/users/davidmoten/following{/other_user}","gists_url":"https://api.github.com/users/davidmoten/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmoten/subscriptions","organizations_url":"https://api.github.com/users/davidmoten/orgs","repos_url":"https://api.github.com/users/davidmoten/repos","events_url":"https://api.github.com/users/davidmoten/events{/privacy}","received_events_url":"https://api.github.com/users/davidmoten/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T08:14:19Z","updated_at":"2015-05-04T08:14:19Z","body":"Don't need to update the perfs because the error path not taken. Are you happy with perfs as they are or would you like to add testing of the error path?"}}