commonMain.com.apollographql.apollo3.testing.channels.kt Maven / Gradle / Ivy
package com.apollographql.apollo3.testing
import com.apollographql.apollo3.annotations.ApolloExperimental
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.withTimeout
@ApolloExperimental
suspend fun Channel.receiveOrTimeout(timeoutMillis: Long = 1000) = withTimeout(timeoutMillis) {
receive()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy