@UnstableApi
class CountDownFuture : AbstractFuture<Void!>

kotlin.Any
   ↳ com.google.common.util.concurrent.internal.InternalFutureFailureAccess
     ↳ com.google.common.util.concurrent.AbstractFuture<Void!>
       ↳ androidx.media3.test.utils.CountDownFuture

A ListenableFuture that completes when countDown has been called a specified number of times.

Summary

Public constructors

Creates an instance initialized with the specified count.

Public functions

Unit

Decrements the remaining count, completing the future when it reaches 0.

Public constructors

CountDownFuture

CountDownFuture(count: Int)

Creates an instance initialized with the specified count.

Parameters
count: Int

The number of times countDown must be invoked before completing. If 0, the future completes immediately.

Throws
java.lang.IllegalArgumentException

if count is negative.

Public functions

countDown

fun countDown(): Unit

Decrements the remaining count, completing the future when it reaches 0.