-
-
Notifications
You must be signed in to change notification settings - Fork 84
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 ConcurrentFuture based on concurrify #70
Conversation
Oh. Forgot documentation again. On its way. |
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 889 929 +40
Branches 214 219 +5
=====================================
+ Hits 889 929 +40
Continue to review full report at Codecov.
|
1c50bc2
to
ba21ad0
Compare
I think that's it. Would you mind taking a look @safareli? |
6d2281a
to
2967549
Compare
README.md
Outdated
@@ -172,6 +174,12 @@ eventualThing.fork( | |||
//> "Hello world!" | |||
``` | |||
|
|||
#### never | |||
##### `.never :: () -> Future a a` |
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.
I'll change this to never :: Future a a
.
1ac47e2
to
61acbad
Compare
fluture.js
Outdated
return `Future.never`; | ||
}; | ||
|
||
Future.never = new FutureNever; |
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.
btw is there some reason of having separate class FutureNever
when it could be implemented like this (as there is only one instance):
Future.never = object.assign(Object.create(Future.prototype),{
_f: function FutureNever$fork(){
return noop;
},
toString: function FutureNever$toString(){
return `Future.never`;
},
})
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.
There's no reason for it. I think it's fine like this: I like the consistent looking code. I guess it's not really important.
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.
it's fine
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.
cool stuff! LGTM
Adds the following exports: * Future.Par :: Future a b -> ConcurrentFuture a b * Future.seq :: ConcurrentFuture a b -> Future a b * Future.never :: Future a a Closes #44
Breaking changes - #74 The argument order of `Future.or()` has been flipped - #75 `Future.isForkable()` has been removed - #75 `Future.fromForkable()` has been removed - #75 `Future.cast()` has been removed New features - #70 Add a new ConcurrentFuture type Bug fixes and improvements - #4 #69 All curried functions now fail fast - #59 Update Sanctuary interoperability - #73 `Future.finally()` now runs `finally` computation when cancelled
Adds the following functions:
Future.Par :: Future a b -> ConcurrentFuture a b
Future.seq :: ConcurrentFuture a b -> Future a b
Future.never :: () -> Future a a