Commit 42ceb380 authored by Him188's avatar Him188

Use CONCURRENT concurrency as default for `subcribeAlways`

parent aadea751
...@@ -228,7 +228,7 @@ fun <E : Event> CoroutineScope.subscribe( ...@@ -228,7 +228,7 @@ fun <E : Event> CoroutineScope.subscribe(
*/ */
inline fun <reified E : Event> CoroutineScope.subscribeAlways( inline fun <reified E : Event> CoroutineScope.subscribeAlways(
coroutineContext: CoroutineContext = EmptyCoroutineContext, coroutineContext: CoroutineContext = EmptyCoroutineContext,
concurrency: Listener.ConcurrencyKind = Listener.ConcurrencyKind.LOCKED, concurrency: Listener.ConcurrencyKind = Listener.ConcurrencyKind.CONCURRENT,
priority: Listener.EventPriority = NORMAL, priority: Listener.EventPriority = NORMAL,
noinline listener: suspend E.(E) -> Unit noinline listener: suspend E.(E) -> Unit
): Listener<E> = subscribeAlways(E::class, coroutineContext, concurrency, priority, listener) ): Listener<E> = subscribeAlways(E::class, coroutineContext, concurrency, priority, listener)
...@@ -240,7 +240,7 @@ inline fun <reified E : Event> CoroutineScope.subscribeAlways( ...@@ -240,7 +240,7 @@ inline fun <reified E : Event> CoroutineScope.subscribeAlways(
fun <E : Event> CoroutineScope.subscribeAlways( fun <E : Event> CoroutineScope.subscribeAlways(
eventClass: KClass<E>, eventClass: KClass<E>,
coroutineContext: CoroutineContext = EmptyCoroutineContext, coroutineContext: CoroutineContext = EmptyCoroutineContext,
concurrency: Listener.ConcurrencyKind = Listener.ConcurrencyKind.LOCKED, concurrency: Listener.ConcurrencyKind = Listener.ConcurrencyKind.CONCURRENT,
priority: Listener.EventPriority = NORMAL, priority: Listener.EventPriority = NORMAL,
listener: suspend E.(E) -> Unit listener: suspend E.(E) -> Unit
): Listener<E> = eventClass.subscribeInternal( ): Listener<E> = eventClass.subscribeInternal(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment