launch On Started
inline fun LifecycleOwner.launchOnStarted(lazyThreadSafetyMode: LazyThreadSafetyMode = LazyThreadSafetyMode.NONE, crossinline block: suspend CoroutineScope.() -> Unit): Lazybones<Job>
Content copied to clipboard
Author
skydoves (Jaewoong Eum)
Returns a Job lazily via Lazybones delegate for invoking the block on the onStarted lifecycleScope.
Return
Lazybones A lazybones wrapper for creating a lifecycle-aware property.
Parameters
lazyThreadSafetyMode
Specifies how a Lazy instance synchronizes initialization among multiple threads.
block
A block that will be executed on the specific lifecycle.
inline fun <T> LifecycleOwner.launchOnStarted(flow: Flow<T>, lazyThreadSafetyMode: LazyThreadSafetyMode = LazyThreadSafetyMode.NONE, crossinline block: (T) -> Unit): Lazybones<Job>
Content copied to clipboard
Author
skydoves (Jaewoong Eum)
Returns a Job lazily via Lazybones delegate for invoking a collected block from the Flow on the onStarted lifecycleScope.
Return
Lazybones A lazybones wrapper for creating a lifecycle-aware property.
Parameters
flow
A flow that will be collected on the specific lifecycle.
lazyThreadSafetyMode
Specifies how a Lazy instance synchronizes initialization among multiple threads.
block
A block that will be executed on the specific lifecycle.