epollcat icon indicating copy to clipboard operation
epollcat copied to clipboard

Implement `java.util.concurrent.ScheduledExecutorService`

Open lolgab opened this issue 1 year ago • 4 comments

java.util.concurrent.ScheduledExecutorService is a Java API for scheduling tasks that can be used to abstract over Scala Native scheduler implementations. ZIO JVM uses java.util.concurrent.ScheduledExecutorService to implement its default scheduler: https://github.com/zio/zio/blob/881beb92b36b7e7c32ee19115c5c6d3a75bc59a9/core/jvm/src/main/scala/zio/Scheduler.scala#L22 Currently ZIO Native uses scala-native-loop's Timer API. This is suboptimal since it couples ZIO with scala-native-loop. If both scala-native-loop and epollcat implement this API, it can be used by ZIO and other runtimes leave the runtime decision to link-time. I'm going to open a companion issue in scala-native-loop.

lolgab avatar Nov 02 '22 10:11 lolgab