Join Slack
Powered by
if I have a java library that requires me to retur...
# coroutines
r
rrva
12/14/2019, 11:49 AM
if I have a java library that requires me to return a CompletionStage<T> for async calls, and I want to perform the call using a coroutine and then bridge back to java CompletionStage, how do I do that?
v
Vsevolod Tolstopyatov [JB]
12/14/2019, 2:55 PM
You can use
future
builder:
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-jdk8/kotlinx.coroutines.future/kotlinx.coroutines.-coroutine-scope/future.html
r
rrva
12/14/2019, 3:45 PM
thanks
5
Views
Open in Slack
Previous
Next