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

All Task abstractions allocating mutable vars need to be built in the Task context #539

Closed
alexandru opened this Issue Jan 17, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@alexandru
Member

alexandru commented Jan 17, 2018

The monix-eval sub-project is about purity by means of Task and Coeval, therefore the abstractions exposed have to be referentially transparent with no exceptions.

All the ugly, mutable stuff goes into monix-execution, some concessions are acceptable for monix-reactive, but monix-eval and monix-tail need to be good FP citizens beyond reproach.

Currently these are:

  • MVar (see discussion at #535 and PR #537)
  • TaskLocal
  • TaskSemaphore
  • TaskCircuitBreaker

Also see discussion on the cats-effect chat channel: January 17, 2018 1:18 PM

Unfortunately this is a breaking change, but one that is done in order to correct a design error and that benefits users.

In Monix 3.0 such breaking changes are acceptable and better to do it now, since we've got an excuse in the deep integration with Cats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment