Zakelly commented on code in PR #25722:
URL: https://github.com/apache/flink/pull/25722#discussion_r1867000341
##########
flink-datastream/src/main/java/org/apache/flink/datastream/impl/operators/ProcessOperator.java:
##########
@@ -98,6 +100,21 @@ protected Object currentKey() {
throw new UnsupportedOperationException("The key is only defined for
keyed operator");
}
+ protected BiConsumer<Runnable, Object> getProcessorWithKey() {
+ if (isAsyncStateProcessingEnabled()) {
+ return (r, k) -> asyncProcessWithKey(k, r::run);
Review Comment:
Yes. The input `runnable` will act just like a `processElement`. The CPU
part would still run in task thread and it allows user to perform async state
requests in their `runnable`, after which the provided state callback will run
back in task thread.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]