O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Computation

The Computation Scheduler is similar to the IO Scheduler in that they are both backed by a worker pool. However, the size of the Computation Scheduler's pool is fixed to the number of cores available in the system. Since the amount of available workers is fixed, means that if there are more jobs to run than the count of processors, they will have to wait until a worker becomes available again.

Since this Scheduler is sensitive to running out of workers, as there are only a few of them (most often 2 to 8), it would be a poor fit for IO-based tasks, and especially for network requests. For example, if there are only 2 workers available (quite often the case on phones), it will take only 2 requests to exhaust the pool. If the request ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required