Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
| // fs2 1.0.0 | |
| import cats.effect._ | |
| import cats.effect.concurrent._ | |
| import cats.implicits._ | |
| import fs2._ | |
| import fs2.concurrent._ | |
| import scala.concurrent.duration._ | |
| object Main extends IOApp { |