lottie-android icon indicating copy to clipboard operation
lottie-android copied to clipboard

Thread pool size will never go beyond corePoolSize if an unbounded queue is used.

Open sadafebrahimi opened this issue 9 months ago • 0 comments

Whenever a ThreadPoolExecutor is constructed with an unbounded workQueue, the pool size will never go beyond corePoolSize. Using maximumPoolSize greater than corePoolSize in such case will not have any impact on the maximum bound of pool size.

Error: lottie/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java:214: error: [ErroneousThreadPoolConstructorChecker] Thread pool size will never go beyond corePoolSize if an unbounded queue is used

  private static final Executor setProgressExecutor = new ThreadPoolExecutor(0, 2, 35, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<>(), new LottieThreadFactory());

https://android-review.googlesource.com/c/platform/external/lottie/+/3091788

sadafebrahimi avatar May 17 '24 17:05 sadafebrahimi