Main

object Main extends IOApp with LazyLogging

Dummy entry point

Source:
Main.scala
trait LazyLogging
trait IOApp
class Object
trait Matchable
class Any
Main.type

Value members

Concrete methods

override def run(args: List[String]): IO[ExitCode]
Definition Classes
IOApp
Source:
Main.scala

Inherited methods

protected def computeWorkerThreadCount: Int

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
final def main(args: Array[String]): Unit
Inherited from:
IOApp
Source:
IOApp.scala
protected def runtime: IORuntime

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
protected def runtimeConfig: IORuntimeConfig

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

Inherited fields

@transient
lazy protected val logger: Logger
Inherited from:
LazyLogging
Source:
Logging.scala