6 ms·
One caveat with coroutines and fibers is that all the code that runs on them must be fully aware that they are running on said coroutines and fibers.
by dblohm7 11y ago
One caveat with coroutines and fibers is that all the code that runs on them must be fully aware that they are running on said coroutines and fibers.
- willtim 11y agoNot true if one is using Haskell (or any other sufficiently expressive language)
- pron 11y agoThat has nothing to do with Haskell's expressivity and everything to do with its full purity. If you look at, say, OCaml, the code (or at least the libraries) must also be aware that it's running in a fiber, just as in Java, Go or Erlang. While full purity has its virtues, it also has serious drawbacks, and it's unclear at this point whether or not at the end of the day purity is a net-gain, neutral, or even a net-loss.
- nqzero 11y agoat least in java (i'm using https://github.com/kilim/kilim https://github.com/kilim/kilim, but quasar appears to be similar), only methods that yield need to be aware
- vbit 11y agoSame for Lua.
- qewrffewqwfqew 11y agoUnder what language / toolkit? Folks are pointing out counterexamples below and I could name a few myself, but I'm curious where you're coming from :-)