Main
Dummy entry point
- Source:
- Main.scala
Value members
Concrete methods
Inherited methods
Controls the number of worker threads which will be allocated to the compute pool in the
underlying runtime. In general, this should be no ''greater'' than the number of physical
threads made available by the underlying kernel (which can be determined using
Runtime.getRuntime().availableProcessors()
). For any application which has significant
additional non-compute thread utilization (such as asynchronous I/O worker threads), it may
be optimal to reduce the number of compute threads by the corresponding amount such that
the total number of active threads exactly matches the number of underlying physical
threads.
Controls the number of worker threads which will be allocated to the compute pool in the
underlying runtime. In general, this should be no ''greater'' than the number of physical
threads made available by the underlying kernel (which can be determined using
Runtime.getRuntime().availableProcessors()
). For any application which has significant
additional non-compute thread utilization (such as asynchronous I/O worker threads), it may
be optimal to reduce the number of compute threads by the corresponding amount such that
the total number of active threads exactly matches the number of underlying physical
threads.
In practice, tuning this parameter is unlikely to affect your application performance beyond a few percentage points, and the default value is optimal (or close to optimal) in ''most'' common scenarios.
'''This setting is JVM-specific and will not compile on JavaScript.'''
For more details on Cats Effect's runtime threading model please see https://typelevel.org/cats-effect/docs/thread-model.
- Inherited from:
- IOApp
- Source:
- IOApp.scala
The runtime which will be used by IOApp
to evaluate the IO produced by the run
method. This may be overridden by IOApp
implementations which have extremely specialized
needs, but this is highly unlikely to ever be truly needed. As an example, if an
application wishes to make use of an alternative compute thread pool (such as
Executors.fixedThreadPool
), it is almost always better to leverage IO.evalOn on the
value produced by the run
method, rather than directly overriding runtime
.
The runtime which will be used by IOApp
to evaluate the IO produced by the run
method. This may be overridden by IOApp
implementations which have extremely specialized
needs, but this is highly unlikely to ever be truly needed. As an example, if an
application wishes to make use of an alternative compute thread pool (such as
Executors.fixedThreadPool
), it is almost always better to leverage IO.evalOn on the
value produced by the run
method, rather than directly overriding runtime
.
In other words, this method is made available to users, but its use is strongly discouraged in favor of other, more precise solutions to specific use-cases.
This value is guaranteed to be equal to unsafe.IORuntime.global.
- Inherited from:
- IOApp
- Source:
- IOApp.scala
The configuration used to initialize the runtime which will evaluate the IO
produced by run
. It is very unlikely that users will need to override this method.
The configuration used to initialize the runtime which will evaluate the IO
produced by run
. It is very unlikely that users will need to override this method.
- Inherited from:
- IOApp
- Source:
- IOApp.scala