All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.udash.rpc.internals.package.scala Maven / Gradle / Ivy

There is a newer version: 0.2.0-rc.3
Show newest version
package io.udash.rpc

import java.util.concurrent.Executors

import com.typesafe.scalalogging.LazyLogging

import scala.concurrent.ExecutionContext

package object internals {
  implicit val internalRPCExecutionContext: ExecutionContext = new ExecutionContext with LazyLogging {
    val threadPool = Executors.newCachedThreadPool()

    def execute(runnable: Runnable): Unit = {
      threadPool.submit(runnable)
    }

    def reportFailure(t: Throwable): Unit = {
      logger.error("RPC execution fail", t)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy