images/src/main/java/com/stanfy/enroscar/images/ImageLoader.java
public boolean addTarget(final ImageConsumer imageHolder) {
    if (future.isCancelled()) { return false; } // we should start a new task

    imageHolder.onStart(this, request.url);

    synchronized (targets) {
      if (result != null) {
        imagesManager.setResultImage(imageHolder, result, false);
        imageHolder.onFinish(request.url, result);
      } else if (error != null) {
        imageHolder.onError(request.url, error);
      } else {
        imageHolder.currentLoader = this;
        targets.add(imageHolder);
      }
    }

    return true;
  }
public boolean addTarget(final ImageConsumer imageHolder) {
    if (future.isCancelled()) { return false; } // we should start a new task

    imageHolder.onStart(this, request.url);

    synchronized (targets) {
      if (result != null) {
        imagesManager.setResultImage(imageHolder, result, false);
        imageHolder.onFinish(request.url, result);
      } else if (error != null) {
        imageHolder.onError(request.url, error);
      } else {
        imageHolder.currentLoader = this;
        targets.add(imageHolder);
      }
    }

    return true;
  }
public boolean addTarget ( final ImageConsumer imageHolder ) { if ( future . isCancelled ( ) ) { return false ; } // we should start a new task imageHolder . onStart ( this , request . url ) ; synchronized ( targets ) { if ( result != null ) { imagesManager . setResultImage ( imageHolder , result , false ) ; imageHolder . onFinish ( request . url , result ) ; } else if ( error != null ) { imageHolder . onError ( request . url , error ) ; } else { imageHolder . currentLoader = this ; targets . add ( imageHolder ) ; } } return true ; }
main thread
main thread