images/src/main/java/com/stanfy/enroscar/images/ImageLoader.java
public void removeTarget(final ImageConsumer consumer) {
    if (imagesManager.debug) { Log.d(TAG, "Cancel request: " + request.getKey() + "\nLoader: " + this); }

    consumer.onCancel(request.url);

    synchronized (targets) {

      targets.remove(consumer);

      if (targets.isEmpty()) {
        if (!future.cancel(true)) {
          if (imagesManager.debug) { Log.d(TAG, "Can't cancel task so let's try to remove loader manually"); }
          imagesManager.currentLoads.remove(request.getKey(), this);
        }
      }

    }
  }
public void removeTarget(final ImageConsumer consumer) {
    if (imagesManager.debug) { Log.d(TAG, "Cancel request: " + request.getKey() + "\nLoader: " + this); }

    consumer.onCancel(request.url);

    synchronized (targets) {

      targets.remove(consumer);

      if (targets.isEmpty()) {
        if (!future.cancel(true)) {
          if (imagesManager.debug) { Log.d(TAG, "Can't cancel task so let's try to remove loader manually"); }
          imagesManager.currentLoads.remove(request.getKey(), this);
        }
      }

    }
  }
public void removeTarget ( final ImageConsumer consumer ) { if ( imagesManager . debug ) { Log . d ( TAG , "Cancel request: " + request . getKey ( ) + "\nLoader: " + this ) ; } consumer . onCancel ( request . url ) ; synchronized ( targets ) { targets . remove ( consumer ) ; if ( targets . isEmpty ( ) ) { if ( ! future . cancel ( true ) ) { if ( imagesManager . debug ) { Log . d ( TAG , "Can't cancel task so let's try to remove loader manually" ) ; } imagesManager . currentLoads . remove ( request . getKey ( ) , this ) ; } } } }
main thread
main thread