All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nonAndroidJvmMain.com.caesarealabs.rpc4k.runtime.platform.ConcurrentCollections.jvm.kt Maven / Gradle / Ivy

package com.caesarealabs.rpc4k.runtime.platform

import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.ConcurrentLinkedQueue

/**
 * Creates a [MutableMap] that is safe to edit in multiple threads at the same time
 */
public actual fun  ConcurrentMutableMap(): MutableMap = ConcurrentHashMap()

/**
 * Creates a [MutableCollection] that is safe to edit in multiple threads at the same time.
 * This is intended to be used as a queue because the most performant implementation is a queue. (In regards to time complexity)
 */
public actual fun  ConcurrentQueue(): MutableCollection = ConcurrentLinkedQueue()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy