Fiberin scalaz is a concrete type that holds the runloop logic
I have some thoughts on improving the run loop, but I don't have time for experiments right now. I'm thinking of introducing the "visitor pattern" we now have in
Iterant too ... when you end up with an ADT with a lot of states, the JVM can do that pattern matching better than you via plain old method dispatches, however for tight flatMap loops pattern matching is faster (saw it in testing) so I have to juggle those modes somewhat ... to switch between method dispatches (visitor) and pattern matching in hot loops.
Not sure how well that will work out without experiments. Plain old method dispatches would be cool for adding more specialized states (
ContextSwitch is a recent example).
evalOnwe have, with a different ec, is the currently recommended choice
evalOnin cats-effect aim to solve
IOthe std is to have a cached thread pool with
Executors.newFixedThreadPoolin Scalaz's RTS.
Strategyin the scalaz world had that as a default
mapConcatin akka streams.
monix-evalsub-project, I have to finish that first. Working as hard as possible, given work and other obligations.
Schedulerinstance. If i understood correctly, you can do
Scheduler#contextShiftprovided that the right implicits are imported. However, when trying to create a
ContextShiftfrom a scheduler instance (https://github.com/47deg/fetch/blob/4328bc61627eaf580624ec825cd63bbe17526659/examples/src/test/scala/MonixExample.scala#L44-L46) I get the following error:
value contextShift is not a member of monix.execution.Scheduler