androidx.xr.runtime.guava


Top-level functions summary

ListenableFuture<T>
<T : Any?> toFuture(session: Session, coroutine: suspend CoroutineScope.() -> T)

Converts a coroutine created within the session to a com.google.common.util.concurrent.ListenableFuture.

Top-level functions

fun <T : Any?> toFuture(session: Session, coroutine: suspend CoroutineScope.() -> T): ListenableFuture<T>

Converts a coroutine created within the session to a com.google.common.util.concurrent.ListenableFuture.

The returned com.google.common.util.concurrent.ListenableFuture will be automatically cancelled when the session is destroyed.

Parameters
session: Session

the androidx.xr.runtime.Session that originated the coroutine.

coroutine: suspend CoroutineScope.() -> T

the coroutine to convert to a com.google.common.util.concurrent.ListenableFuture.