images/src/main/java/com/stanfy/enroscar/images/ImageLoader.java
private void safeImageSet(final ImageResult result) {
    if (imagesManager.debug) { Log.v(ImagesManager.TAG, "Post setting drawable for " + request.getKey()); }

    synchronized (targets) {
      if (this.result != null) { throw new IllegalStateException("Result is already set"); }
      memCacheImage(result);
      this.result = result;
    }

    post(new Runnable() {
      @Override
      public void run() {
        if (imagesManager.debug) {
          Log.v(TAG, "Set drawable for " + request.getKey());
        }

        final ArrayList<ImageConsumer> targets = ImageLoader.this.targets;
        final int count = targets.size();
        if (count > 0) {
          //noinspection ForLoopReplaceableByForEach
          for (int i = 0; i < count; i++) {
            final ImageConsumer imageHolder = targets.get(i);
            if (imagesManager.debug) {
              Log.d(TAG, "Try to set " + imageHolder + " - " + request.getKey());
            }
            setToConsumer(imageHolder, result);
          }
        } else if (imagesManager.debug) {
          Log.w(TAG, "set drawable: have no targets in list");
        }

      }
    });
  }
private void safeImageSet(final ImageResult result) {
    if (imagesManager.debug) { Log.v(ImagesManager.TAG, "Post setting drawable for " + request.getKey()); }

    synchronized (targets) {
      if (this.result != null) { throw new IllegalStateException("Result is already set"); }
      memCacheImage(result);
      this.result = result;
    }

    post(new Runnable() {
      @Override
      public void run() {
        if (imagesManager.debug) {
          Log.v(TAG, "Set drawable for " + request.getKey());
        }

        final ArrayList<ImageConsumer> targets = ImageLoader.this.targets;
        final int count = targets.size();
        if (count > 0) {
          //noinspection ForLoopReplaceableByForEach
          for (int i = 0; i < count; i++) {
            final ImageConsumer imageHolder = targets.get(i);
            if (imagesManager.debug) {
              Log.d(TAG, "Try to set " + imageHolder + " - " + request.getKey());
            }
            setToConsumer(imageHolder, result);
          }
        } else if (imagesManager.debug) {
          Log.w(TAG, "set drawable: have no targets in list");
        }

      }
    });
  }
worker thread