-
Notifications
You must be signed in to change notification settings - Fork 151
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
=str Tweak the stream mapAsyncPartitioned operator #676
Conversation
stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala
Show resolved
Hide resolved
21a80c7
to
ba60197
Compare
Can you update the |
@jaceksokol could you have a look? The changes generally seem reasonable to me. I intend to do a more thorough check within the next few days. |
// To support both fail-fast when the supervision directive is Stop | ||
// and not calling the decider multiple times (#23888) we need to cache the decider result and re-use that | ||
private var cachedSupervisionDirective: Option[Supervision.Directive] = None | ||
private final class Holder[In, Out](val in: In, var out: Try[Out], val cb: AsyncCallback[Holder[In, Out]]) extends ( |
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.
could we use the name callback
instead of cb
?
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 changed it to
cb
as the same inHolder
inMapAsync
. - the
cb
is ok, Cats-Effect usecb
in unsafeRunAsync too, maybe that's fine to keep it?
Most of the changes are related to code style / structure - LGTM. |
@pjfanning It is |
@jaceksokol Thanks, I also added a description about the behavior, which the max parallelism of per partition is |
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.
lgtm
Motivation:
refs: #561