-
val fn: (Int) -> Uni<Data>
//how should I transform function foo to bar without blocking or suspend
val bar: Uni<(Int)-> Data> in java descrpition interface Func<P, R> {
R invoke(P p);
}
Func<Integer, Uni<Object>> foo;
Uni<Func<Integer, Object>> bar; |
Beta Was this translation helpful? Give feedback.
Answered by
jponge
Sep 14, 2022
Replies: 1 comment
-
If you have a |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yazinnnn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have a
Uni
-returning function, then it means thatUni
will eventually provide a result. I'm afraid the only way is to somehow wait/block if you want to convert to a value-returning function.