-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Issue 24519: Created method lazilyAsync for both DSLs and adds section in docs #24568
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
Conversation
|
Thank you for your pull request! After a quick sanity check one of the team will reply with 'OK TO TEST' to kick off our automated validation on Jenkins. This compiles the project, runs the tests, and checks for things like binary compatibility and source code formatting. When two team members have also manually reviewed and (perhaps after asking for some amendments) accepted your contribution, it should be good to be merged. For more details about our contributing process, check out CONTRIBUTING.md - and feel free to ask! |
|
OK TO TEST |
ktoso
left a comment
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.
Almost there, please add a test too
|
|
||
| --------------------------------------------------------------- | ||
|
|
||
| ### actorPublisher |
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 should not be here anymore :)
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.
Ooops, removed.
| * Creates a `Source` from supplied future factory that is not called until downstream demand. When source gets | ||
| * materialized the materialized future is completed with the value from the factory. If downstream cancels or fails | ||
| * without any demand the create factory is never called and the materialized `Future` is failed. | ||
| */ |
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.
Add a link to the normal one
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.
Yep, done.
| * materialized the materialized future is completed with the value from the factory. If downstream cancels or fails | ||
| * without any demand the create factory is never called and the materialized `Future` is failed. | ||
| */ | ||
| def lazilyAsync[T](create: () ⇒ CompletionStage[T]): Source[T, Future[NotUsed]] = |
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 should work on Scala.concurrent.Future :)
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.
Makes sense, also done.
|
Test PASSed. |
|
Sure, was on it. Added unit tests similar to the ones from |
|
Test PASSed. |
|
Test PASSed. |
| @@ -0,0 +1,77 @@ | |||
| package akka.stream.scaladsl | |||
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.
All files must have the header:
/**
* Copyright (C) 2014-2018 Lightbend Inc. <https://www.lightbend.com>
*/
We'll soon automate that I hope
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 but also see that you did that already, sorry for kind of a mess :(
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.
Oh, sorry -- I somehow expected you be in EU timezone so was taking my time prepping and going to merge this while EU is asleep :)
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.
CST actually :) but thanks for taking care of it, much appreciated
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.
Also, I could work on automating copyright check if you can supply issue for it
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.
Cheers to CST from JST then :)
For the copyright we want to replicate what we have here: akka/akka-http#1738
|
Test PASSed. |
Nope, it's good as is.
Nope, it's enough to have it in the overview doc. Cookbook is for "this is how you can put together a number of things to achieve some thing" |
|
LGTM, simple enough that we can merge once validated I think 👍 |
|
Test PASSed. |
|
I think all issues highlighted in PR were addressed. Is there anything else required for this PR to be merged? |
|
Lookin good, thanks 👍 |
This PR addresses issue #24519. Open questions so far:
classlevel implementation (likeLazySourceand friends)?stream-cookbook.md)?