Documentation / dataflow-async / com.femastudios.dataflow.async / Attribute / waitWhileLoading
Go to reference

waitWhileLoading

open fun waitWhileLoading(): AttributeData<T>

Blocks the caller thread indefinitely until this attribute has a Loading status, then returns the current status, which can be either Error or Loaded


open fun waitWhileLoading(maxWaitTime: Long): AttributeData<T>

Blocks the caller thread until this attribute has a Loading status for a maximum time of maxWaitTime, then returns the current status, which can be either Error or Loaded if the waited time is less than maxWaitTime or Loading if after maxWaitTime milliseconds the attribute is still Loading