Skip to content

Commit

Permalink
Reduce unnecessary @PublishedApi surface of UnbiasedSelectBuilderImpl (
Browse files Browse the repository at this point in the history
  • Loading branch information
qwwdfsad committed Jul 25, 2022
1 parent 19666ac commit 3e7873f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
Expand Up @@ -1259,8 +1259,6 @@ public final class kotlinx/coroutines/selects/SelectUnbiasedKt {

public final class kotlinx/coroutines/selects/UnbiasedSelectBuilderImpl : kotlinx/coroutines/selects/SelectBuilder {
public fun <init> (Lkotlin/coroutines/Continuation;)V
public final fun getClauses ()Ljava/util/ArrayList;
public final fun getInstance ()Lkotlinx/coroutines/selects/SelectBuilderImpl;
public final fun handleBuilderException (Ljava/lang/Throwable;)V
public final fun initSelectResult ()Ljava/lang/Object;
public fun invoke (Lkotlinx/coroutines/selects/SelectClause0;Lkotlin/jvm/functions/Function1;)V
Expand Down
10 changes: 6 additions & 4 deletions kotlinx-coroutines-core/common/src/selects/SelectUnbiased.kt
Expand Up @@ -30,10 +30,12 @@ public suspend inline fun <R> selectUnbiased(crossinline builder: SelectBuilder<


@PublishedApi
internal class UnbiasedSelectBuilderImpl<in R>(uCont: Continuation<R>) :
SelectBuilder<R> {
val instance = SelectBuilderImpl(uCont)
val clauses = arrayListOf<() -> Unit>()
internal class UnbiasedSelectBuilderImpl<in R>(
uCont: Continuation<R>
) : SelectBuilder<R> {

private val instance = SelectBuilderImpl(uCont)
private val clauses = arrayListOf<() -> Unit>()

@PublishedApi
internal fun handleBuilderException(e: Throwable): Unit = instance.handleBuilderException(e)
Expand Down

0 comments on commit 3e7873f

Please sign in to comment.