-
Notifications
You must be signed in to change notification settings - Fork 8
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 basic flow functions and creation methods #63
Conversation
* move from Throwable to Exception * add `runFold`, `runDrain`, `onComplete`, `onDone`, `onError` * fix error propagation with `buffer` method * simplify redundant casting and lambdas * fix `groupedWeighted` * fix `runLastToChannelAsync` * fix `com.softwaremill.jox.FlowEmit.channelToEmit` * fix `com.softwaremill.jox.Flows.concat` and `com.softwaremill.jox.Flows.fromCompletableFuture` * migrated more tests
8342557
to
a365519
Compare
* suppress warnings * removed redundant exception wrapping in FlowEmit
a365519
to
3df33d2
Compare
I think this looks relatively complete? If so, mark as ready :) |
* added module in parent pom * moved classes into dedicated package
* removed @WithUnsupervisedScope
* <p> | ||
* By default, buffer capacity is unlimited. | ||
* <p> | ||
* Blocks until the flow completes. |
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.
this comment is incorrect/lacking:
- the channel is rendezvous (capacity 0), not unlimited. Rendezvous channels might mean poor capacity, so I think we should instead by default use a 16-buffered channel (as in Ox). Question is, how to provide this data. Explicit parameters are ... explicit, and not that nice. Scope-local value, maybe? This could be used in other places a swell
- the method doesn't block - that's also incorrect in Ox's docs, I'll fix it in a second
- there's no mention on why you need a supervision scope - and I think this might not be obvious to users
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.
- In the next MR, I've added overloaded method with buffer capacity as additional parametr, but there are more methods with similar problems.
I've added ScopedValue in Channel together with default size.
I'll also add overloaded method in second MR to keep flexibility.
We might want to consider adding Value Object for buffer capacity to keep things like unlimited buffer, rendevous size, default size, run with scoped etc.
- Fixed
- Added, please review if is understandable
* <p> | ||
* By default, buffer capacity is unlimited. | ||
* <p> | ||
* Blocks until the flow completes. |
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.
this comment is incorrect/lacking:
- the channel is rendezvous (capacity 0), not unlimited. Rendezvous channels might mean poor capacity, so I think we should instead by default use a 16-buffered channel (as in Ox). Question is, how to provide this data. Explicit parameters are ... explicit, and not that nice. Scope-local value, maybe? This could be used in other places a swell
- the method doesn't block - that's also incorrect in Ox's docs, I'll fix it in a second
- there's no mention on why you need a supervision scope - and I think this might not be obvious to users
* fixed documentation * added ScopedValue support
f296448
to
d21c53d
Compare
Thanks, let's continue on other PRs :) |
No description provided.