package wow.doge.mygame.executors

import cats.effect.Resource
import monix.bio.Task
import monix.execution.Scheduler

trait ExecutorsModule {
  lazy val schedulers = Schedulers()
  // Resource.make(
  //   Task(
  //     new Schedulers(
  //       jme = Scheduler
  //         .singleThread(name = "JME-Application-Thread", daemonic = false)
  //     )
  //   )
  // )(s => Task(s.jme.shutdown()))
  lazy val jMESchedulerResource = Resource.make(
    Task(
      Scheduler
        .singleThread(name = "JME-Application-Thread", daemonic = false)
    )
  )(e => Task(e.shutdown()))
}
