You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It'd be nice if the LD SDK used CompletableFuture<T> (or if the internal Future impl. types LDAwaitFuture<T>, etc, implemented CompletionStage<T>) so that Kotlin apps could leverage the built-in conversion functions from kotlinx.coroutines.future to convert Future's to suspend fn's.
Right now, clients have to do this conversion manually:
Ultimately it's not a ton of work to do this manually, but it'd be convenient to eliminate some of this boilerplate conversion code (if supporting CompletableFuture<T> is easy to do on your end).
Describe the solution you'd like
Supporting one of the above types. This would allow Kotlin clients to use kotlinx conversion functions like this:
suspend fun identifyInternal(): Unit {
return client.identify(/* build a context */).await()
}
Describe alternatives you've considered
Continue doing the hand-written/manual conversion listed above.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Hi @erawhctim, thank you for the feedback. I'm generally in agreement with you that a built in completable future should be used. Android added support for CompletableFuture in API 24 and our minimum API at the moment is 21. Does that sound correct? If so, I believe we'll have to wait until our min API is at least 24 before integrating this change.
Is your feature request related to a problem? Please describe.
It'd be nice if the LD SDK used
CompletableFuture<T>
(or if the internal Future impl. typesLDAwaitFuture<T>
, etc, implementedCompletionStage<T>
) so that Kotlin apps could leverage the built-in conversion functions fromkotlinx.coroutines.future
to convert Future's to suspend fn's.Right now, clients have to do this conversion manually:
Ultimately it's not a ton of work to do this manually, but it'd be convenient to eliminate some of this boilerplate conversion code (if supporting
CompletableFuture<T>
is easy to do on your end).Describe the solution you'd like
Supporting one of the above types. This would allow Kotlin clients to use
kotlinx
conversion functions like this:Describe alternatives you've considered
Continue doing the hand-written/manual conversion listed above.
Additional context
N/A
The text was updated successfully, but these errors were encountered: