19 lines
396 B
Scala
19 lines
396 B
Scala
|
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
|