title: InterruptedException in RxJava cache thread when debugging on Android
body: <p>Sometimes when I am debugging my app, I encounter InterruptedException in RxCachedThreadScheduler-1. Here's the trace:
  </p>
  
  <pre class="lang-java prettyprint-override"><code>Fatal Exception: java.lang.InterruptedException
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1991)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2025)
         at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1048)
         at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:776)
         at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
  </code></pre>
  
  <p>I have a custom view in which I subscribe to my observable like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Override
  protected void onAttachedToWindow() {
      super.onAttachedToWindow();
  
      sub = FollowHandler.getInstance().getObservable()
              .filter(new Func1&lt;FollowEvent, Boolean&gt;() {
                  @Override
                  public Boolean call(FollowEvent followEvent) {
                      if(followEvent == null || followEvent.user == null
                              || user == null)
                          return false;
  
                      return followEvent.user.id == user.id;
                  }
              })
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe(new Observer&lt;FollowEvent&gt;() {
                  @Override
                  public void onCompleted() {}
  
                  @Override
                  public void onError(Throwable e) {}
  
                  @Override
                  public void onNext(FollowEvent followEvent) {
                      reactToThisNiceEvent(followEvent);
                  }
              });
  }
  
  @Override
  protected void onDetachedFromWindow() {
      super.onDetachedFromWindow();
  
      if(sub != null)
          sub.unsubscribe();
  }
  </code></pre>
  
  <p>Here's the observable:</p>
  
  <pre class="lang-java prettyprint-override"><code>eventSubject.asObservable()
          .observeOn(Schedulers.io())
          .doOnNext(new Action1&lt;FollowEvent&gt;() {
              @Override
              public void call(FollowEvent followEvent) {
                  if(followEvent != null)
                      doSomethingNice(followEvent);
              }
          })
          .share();
  </code></pre>
  
  <p>in which eventSubject is a simple PublishSubject.
  I am using RxAndroid 1.1.0 alongside RxJava 1.1.0.</p>
  
  <p>Does anyone know why this is happening?</p>