Back to Filament

wait

docs/android/dokka/filament-android/com.google.android.filament/-fence/wait.md

1.75.01.0 KB
Original Source

//filament-android/com.google.android.filament/Fence/wait

wait

[main]
open fun wait(mode: Fence.Mode, timeoutNanoSeconds: Long): Fence.FenceStatus

Client-side wait on the Fence. Blocks the current thread until the Fence signals.

Return

FenceStatus::CONDITION_SATISFIED on success, FenceStatus::TIMEOUT_EXPIRED if the time out expired or FenceStatus::ERROR in other cases.

Parameters

main

modeWhether the command stream is flushed before waiting or not.
timeoutNanoSecondsWait time out in nanoseconds. Using a timeout of 0 is a way to query the state of the fence. A timeout value of WAIT_FOR_EVER is used to disable the timeout.

Throws

Errorif the backend thread encountered an unrecoverable error.