Android Scope
open class AndroidScope(lifecycleOwner: LifecycleOwner?, lifeEvent: Lifecycle.Event, dispatcher: CoroutineDispatcher) : CoroutineScope, Closeable
Content copied to clipboard
异步协程作用域
Parameters
lifecycleOwner
生命周期持有者
lifeEvent
生命周期事件, 默认为Lifecycle.Event.ON_DESTROY下取消协程作用域
Constructors
AndroidScope
Link copied to clipboard
fun AndroidScope(lifecycleOwner: LifecycleOwner? = null, lifeEvent: Lifecycle.Event = Lifecycle.Event.ON_DESTROY, dispatcher: CoroutineDispatcher = Dispatchers.Main)
Content copied to clipboard
生命周期持有者
Functions
catch
Link copied to clipboard
open fun catch(block: AndroidScope.(Throwable) -> Unit = {}): AndroidScope
Content copied to clipboard
finally
Link copied to clipboard
open fun finally(block: AndroidScope.(Throwable?) -> Unit = {}): AndroidScope
Content copied to clipboard
handleError
Link copied to clipboard
launch
Link copied to clipboard
Properties
coroutineContext
Link copied to clipboard
dispatcher
Link copied to clipboard
scopeGroup
Link copied to clipboard
Inheritors
NetCoroutineScope
Link copied to clipboard