commonMain.com.caesarealabs.rpc4k.runtime.implementation.Utils.kt Maven / Gradle / Ivy
package com.caesarealabs.rpc4k.runtime.implementation
import com.caesarealabs.rpc4k.runtime.platform.ConcurrentQueue
internal fun MutableMap>.concurrentAdd(
key: K,
value: V
) {
val list = this[key]
if (list == null) this[key] = ConcurrentQueue().apply { add(value) }
else list.add(value)
}