SyncFenceWrapper


@ExperimentalApi
class SyncFenceWrapper


A wrapper for SyncFence that exists on all API levels.

Summary

Public functions

SyncFence!
@RequiresApi(value = 33)
asSyncFence()

Returns the wrapped SyncFence.

Boolean
@RequiresApi(value = 26)
await(timeout: Duration!)

Waits for the fence to signal.

Unit

Waits forever for the fence to signal.

Boolean
awaitMs(timeoutMs: Long)

Waits for the fence to signal.

Unit

Closes the fence.

java-static SyncFenceWrapper!
@RequiresApi(value = 33)
of(syncFence: SyncFence!)

Returns a SyncFenceWrapper that wraps the given syncFence.

Public functions

asSyncFence

@RequiresApi(value = 33)
fun asSyncFence(): SyncFence!

Returns the wrapped SyncFence.

Throws
java.lang.IllegalStateException

if called on API level <33.

await

@RequiresApi(value = 26)
fun await(timeout: Duration!): Boolean

Waits for the fence to signal.

awaitForever

fun awaitForever(): Unit

Waits forever for the fence to signal.

awaitMs

fun awaitMs(timeoutMs: Long): Boolean

Waits for the fence to signal.

close

fun close(): Unit

Closes the fence.

of

@RequiresApi(value = 33)
java-static fun of(syncFence: SyncFence!): SyncFenceWrapper!

Returns a SyncFenceWrapper that wraps the given syncFence.