-
- All Implemented Interfaces:
-
com.facebook.imagepipeline.producers.Producer
public final class ThreadHandoffProducer<T extends Object> implements Producer<T>
Uses ExecutorService to move further computation to different thread
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classThreadHandoffProducer.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Producer<T>inputProducerprivate final ThreadHandoffProducerQueuethreadHandoffProducerQueue
-
Constructor Summary
Constructors Constructor Description ThreadHandoffProducer(Producer<T> inputProducer, ThreadHandoffProducerQueue threadHandoffProducerQueue)
-
Method Summary
Modifier and Type Method Description final Producer<T>getInputProducer()final ThreadHandoffProducerQueuegetThreadHandoffProducerQueue()UnitproduceResults(Consumer<T> consumer, ProducerContext context)Start producing results for given context. -
-
Constructor Detail
-
ThreadHandoffProducer
ThreadHandoffProducer(Producer<T> inputProducer, ThreadHandoffProducerQueue threadHandoffProducerQueue)
-
-
Method Detail
-
getInputProducer
final Producer<T> getInputProducer()
-
getThreadHandoffProducerQueue
final ThreadHandoffProducerQueue getThreadHandoffProducerQueue()
-
produceResults
Unit produceResults(Consumer<T> consumer, ProducerContext context)
Start producing results for given context. Provided consumer is notified whenever progress is made (new value is ready or error occurs).
-
-
-
-