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

nativeMain.kotlinx.serialization.json.internal.createMapForCache.kt Maven / Gradle / Ivy

/*
 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package kotlinx.serialization.json.internal

/**
 * Creates a ConcurrentHashMap on JVM and regular HashMap on other platforms.
 * To make actual use of cache in Kotlin/Native, mark a top-level object with this map
 * as a @[ThreadLocal].
 */
internal actual fun  createMapForCache(initialCapacity: Int): MutableMap = HashMap(initialCapacity)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy