Scala-Play-Slick-Demo/app/util/Schedulers.scala

19 lines
396 B
Scala
Raw Normal View History

package util
import monix.execution.Scheduler
/**
* Class containing various schedulers for offloading blocking tasks
* from play's default thread pool
*
* @param dbScheduler
* @param cpuScheduler
*/
trait Schedulers {
def dbScheduler: Scheduler
def cpuScheduler: Scheduler
}
class SchedulersImpl(val dbScheduler: Scheduler, val cpuScheduler: Scheduler)
extends Schedulers