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

org.gfccollective.concurrent.SameThreadExecutionContext.scala Maven / Gradle / Ivy

The newest version!
package org.gfccollective.concurrent

import scala.concurrent.ExecutionContext
import org.gfccollective.logging.Loggable

/**
 * For small code blocks that don't need to be run on a separate thread.
 */
object SameThreadExecutionContext extends ExecutionContext with Loggable {
  override def execute(runnable: Runnable): Unit = runnable.run
  override def reportFailure(t: Throwable): Unit = error(t.getMessage, t)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy