Fix RxBuilder scheduler comment (#337)
* fixes https://github.com/dropbox/Store/issues/207 by making comment align with non rx builder * add rx3 comment as well Co-authored-by: miken <miken@dropbox.com>
This commit is contained in:
parent
374ff3d478
commit
b897ea1add
2 changed files with 22 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.dropbox.store.rx2
|
||||
|
||||
import com.dropbox.android.external.store4.Store
|
||||
import com.dropbox.android.external.store4.StoreBuilder
|
||||
import io.reactivex.Scheduler
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
@ -7,8 +8,16 @@ import kotlinx.coroutines.GlobalScope
|
|||
import kotlinx.coroutines.rx2.asCoroutineDispatcher
|
||||
|
||||
/**
|
||||
* Define what scheduler fetcher requests will be called on,
|
||||
* if a scheduler is not set Store will use [GlobalScope]
|
||||
* A store multicasts same [Output] value to many consumers (Similar to RxJava.share()), by default
|
||||
* [Store] will open a global scope for management of shared responses, if instead you'd like to control
|
||||
* the scheduler that sharing/multicasting happens in you can pass a @param [scheduler]
|
||||
*
|
||||
* Note this does not control what scheduler a response is emitted on but rather what thread/scheduler
|
||||
* to use when managing in flight responses. This is usually used for things like testing where you
|
||||
* may want to confine to a scheduler backed by a single thread executor
|
||||
*
|
||||
* @param scheduler - scheduler to use for sharing
|
||||
* if a scheduler is not set Store will use [GlobalScope]
|
||||
*/
|
||||
fun <Key : Any, Output : Any> StoreBuilder<Key, Output>.withScheduler(
|
||||
scheduler: Scheduler
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.dropbox.store.rx3
|
||||
|
||||
import com.dropbox.android.external.store4.Store
|
||||
import com.dropbox.android.external.store4.StoreBuilder
|
||||
import io.reactivex.rxjava3.core.Scheduler
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
@ -7,8 +8,16 @@ import kotlinx.coroutines.GlobalScope
|
|||
import kotlinx.coroutines.rx3.asCoroutineDispatcher
|
||||
|
||||
/**
|
||||
* Define what scheduler fetcher requests will be called on,
|
||||
* if a scheduler is not set Store will use [GlobalScope]
|
||||
* A store multicasts same [Output] value to many consumers (Similar to RxJava.share()), by default
|
||||
* [Store] will open a global scope for management of shared responses, if instead you'd like to control
|
||||
* the scheduler that sharing/multicasting happens in you can pass a @param [scheduler]
|
||||
*
|
||||
* Note this does not control what scheduler a response is emitted on but rather what thread/scheduler
|
||||
* to use when managing in flight responses. This is usually used for things like testing where you
|
||||
* may want to confine to a scheduler backed by a single thread executor
|
||||
*
|
||||
* @param scheduler - scheduler to use for sharing
|
||||
* if a scheduler is not set Store will use [GlobalScope]
|
||||
*/
|
||||
fun <Key : Any, Output : Any> StoreBuilder<Key, Output>.withScheduler(
|
||||
scheduler: Scheduler
|
||||
|
|
Loading…
Reference in a new issue