-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add IO/Task section to FAQ #1227
Conversation
Current coverage is 89.62% (diff: 100%)@@ master #1227 diff @@
==========================================
Files 234 234
Lines 3143 3143
Methods 3089 3089
Messages 0 0
Branches 51 51
==========================================
Hits 2817 2817
Misses 326 326
Partials 0 0
|
👍 |
- Is [scala.js](https://www.scala-js.org/) supported? | ||
- Should you be able to block a thread waiting for the result of a task? This is really convenient for tests, but it isn't really compatible with a JavaScript runtime and therefore is an issue for [scala.js](https://www.scala-js.org/). | ||
|
||
For some use-cases, a very simple `IO` is the best answer, as it avoids a lot of the overhead and complexity of other solutions. However, other use-cases require low-level concurrency control with asynchrony, resource management, and stack-safety. Considering all of the competing concerns, Cats has opted to not implement its own `IO`/`Task` types and instead encourage users to use a separate library that best serves their use-case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an alternate approach is use Free
and specify the things you need to do, then finally interpret those into Xor
, Try
or Future
at the end of the world. I think this is a good approach too because generally the IO
winds up being kind of an Any
side-effect when most times you have a pretty narrow scope.
We already have some nice Free
docs to point to, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnynek good point. I'll add a note about Free
and point to the free docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. Let me know what you think.
👍 |
👍 |
👍 Thanks very much! |
I'd be particularly interested in reviews from @mpilquist and @alexandru. Please let me know if there's any way that I can improve the descriptions of Monix and fs2 Tasks.