Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement java.util.concurrent.ScheduledExecutorService #45

Open
lolgab opened this issue Nov 2, 2022 · 0 comments
Open

Implement java.util.concurrent.ScheduledExecutorService #45

lolgab opened this issue Nov 2, 2022 · 0 comments

Comments

@lolgab
Copy link
Collaborator

lolgab commented Nov 2, 2022

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.
Companion issue: armanbilge/epollcat#82

@lolgab lolgab changed the title 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. Implement java.util.concurrent.ScheduledExecutorService Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant