package wow.doge.mygame.executors

import cats.effect.Resource
import monix.bio.Task
import monix.execution.Scheduler
import wow.doge.mygame.types.JmeScheduler

trait ExecutorsModule {

  val schedulers = Schedulers.default

  val jmeSchedulerResource = Resource.make(
    Task(
      JmeScheduler(
        Scheduler
          .singleThread(name = "JME-Application-Thread", daemonic = false)
      )
    )
  )(s => Task(s.value.shutdown()))
}

sealed trait Error
case object Error extends Error
