Learning RxJava by Thomas Nield

Learning RxJava by Thomas Nield

Author:Thomas Nield [Nield, Thomas]
Language: eng
Format: azw3, pdf
Publisher: Packt Publishing
Published: 2017-06-20T04:00:00+00:00


ExecutorService

You can build a Scheduler off a standard Java ExecutorService. You may choose to do this in order to have more custom and fine-tuned control over your thread management policies. For example, say, we want to create a Scheduler that uses 20 threads. We can create a new fixed ExecutorService specified with this number of threads. Then, you can wrap it inside a Scheduler implementation by calling Schedulers.from():

import io.reactivex.Observable;

import io.reactivex.Scheduler;

import io.reactivex.schedulers.Schedulers;

import java.util.concurrent.ExecutorService;

import java.util.concurrent.Executors;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.