opened
lexer
username_0
Sample:

``` java
Observable<HttpResponse> observeResponse(String url) {
  Observable<HttpResponse> observable = Observable.create(new Observable.OnSubscribeFunc<HttpResponse>() {
     @Override
     public Subscription onSubscribe(final Observer<? super HttpResponse> observer) {
     HttpResponse response = null;
      try {
        response = httpClient.getResponse(url);
        observer.onNext(response);
        observer.onComplete();
      } catch (Exeception e) {
        observer.onError(e);
      }

      return new Subscription() {
        @Override
        public void unsubscribe() {
            if (response != null) {
              response.disconnect();
            }
        }
      }
     }
  }

  return observable;
}
```

Problem with that implementation that unsubscribe don't interrupt execution. It seems that this block should be wrapped by FutureTask that got canceled in unsubscribe.

Probably FutureTask is bad class to use and there is something build in to RxJava?
What is the proper way to implement observable that get canceled after unsubscribe?
issue
created
rorlig
username_1
@username_0 how did you ultimately resolve this issue?
comment