effective function name

This commit is contained in:
Him188 2019-10-28 22:07:14 +08:00
parent 9854000492
commit b9129576bb
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ private const val IMAGE_BUFFER_CAPACITY: Int = 5
@ExperimentalUnsignedTypes
@ExperimentalCoroutinesApi
object Gentlemen : MutableMap<UInt, Gentleman> by mutableMapOf() {
fun getOrPut(key: Contact): Gentleman = this.getOrPut(key.id) { Gentleman(key) }
fun provide(key: Contact): Gentleman = this.getOrPut(key.id) { Gentleman(key) }
}
/**

View File

@ -43,7 +43,7 @@ suspend fun main() {
try {
repeat(it.toIntOrNull() ?: 1) {
launch {
Gentlemen.getOrPut(subject).receive().image.await().send()
Gentlemen.provide(subject).receive().image.await().send()
}
}
} catch (e: Exception) {