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

Add IO/Task section to FAQ #1227

Merged
merged 2 commits into from
Jul 26, 2016
Merged

Add IO/Task section to FAQ #1227

merged 2 commits into from
Jul 26, 2016

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Jul 24, 2016

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.

@codecov-io
Copy link

codecov-io commented Jul 24, 2016

Current coverage is 89.62% (diff: 100%)

Merging #1227 into master will not change coverage

@@             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          

Sunburst

Powered by Codecov. Last update b07b1b3...b409a5c

@alexandru
Copy link
Member

👍

- 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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@mpilquist
Copy link
Member

👍

@johnynek
Copy link
Contributor

👍

@kailuowang
Copy link
Contributor

👍 Thanks very much!

@kailuowang kailuowang merged commit a2d8f60 into typelevel:master Jul 26, 2016
@ceedubs ceedubs mentioned this pull request Jul 27, 2016
8 tasks
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

Successfully merging this pull request may close these issues.

6 participants