Skip to content

Instantly share code, notes, and snippets.

View frojasg's full-sized avatar

Francisco Rojas frojasg

  • San Francisco, California
View GitHub Profile
@frojasg
frojasg / PriceSyncer.kt
Last active June 21, 2021 15:32
playing with coroutines
package frojasg.marketprices
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.ReceiveChannel
import kotlinx.coroutines.channels.ticker
import kotlinx.coroutines.flow.*
import java.time.Clock
import java.time.Instant
import java.lang.IllegalStateException