qisdk / com.aldebaran.qi.sdk.util / FutureUtils / futureOf

futureOf

open static fun <R : Any!> futureOf(function: Function<Future<Void!>!, Future<R>!>!): Future<R>!

Return a Future of a Function

Parameters

function - Function<Future<Void!>!, Future<R>!>!: the function to be asynchronously executed

- the type returned by the future

Return
Future<R>!: the future of the function

open static fun futureOf(consumer: Consumer<Future<Void!>!>!): Future<Void!>!

Return a Future of a Consumer

Parameters

consumer - Consumer<Future<Void!>!>!: the consumer to be asynchronously executed

Return
Future<Void!>!: the future of the consumer