1 package kotlinx.coroutines.flow.internal 2 3 import kotlinx.coroutines.* 4 import kotlinx.coroutines.channels.* 5 import kotlinx.coroutines.flow.* 6 7 /** 8 * Collection that sends to channel 9 * @suppress **This an internal API and should not be used from general code.** 10 */ 11 @InternalCoroutinesApi 12 public class SendingCollector<T>( 13 private val channel: SendChannel<T> 14 ) : FlowCollector<T> { emitnull15 override suspend fun emit(value: T): Unit = channel.send(value) 16 } 17