Replies: 3 comments
-
Hi! In gears you would unlink a Future to do that.
As for a general scheduler, I don’t think we will try to ship a self made
scheduler soon, but any scheduler implementing Gear’s Scheduler interface
can be used.
Le lun. 18 nov. 2024 à 15:48, Alex Boisvert ***@***.***> a
écrit :
… Hi there,
Occasionally I'd like to run a computation in an independent scope,
effectively "breaking out" of the structured concurrency paradigm. With
ZIO, for example, I'd use forkDaemon.
What is the equivalent in gears? If any.
Also, while I'm at it, are there plans to provide a more general
scheduler? I'm thinking something similar to the Java platform
SchedulerExecutorService, but would provide better Scala/Gears ergonomics.
- https://zio.dev/reference/fiber/fiber.md/#fork-in-global-scope-daemon
-
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html
—
Reply to this email directly, view it on GitHub
<#107>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFEK2JSF5XJJRKNZEIME532BH43TAVCNFSM6AAAAABR72WBLSVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGUYDMNZYGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Another option, especially if you have multiple tasks to break out, is the spawning Resource. Using Note that this is currently on the main branch only, but not yet released. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the responses! I'll look into those options and explore what's best for our use-case. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
Occasionally I'd like to run a computation in an independent scope, effectively "breaking out" of the structured concurrency paradigm. With ZIO, for example, I'd use
forkDaemon
.What is the equivalent in gears? If any.
Also, while I'm at it, are there plans to provide a more general scheduler? I'm thinking something similar to the Java platform
SchedulerExecutorService
, but would provide better Scala/Gears ergonomics.Beta Was this translation helpful? Give feedback.
All reactions