包级(Package-level) 声明(declarations)

函数

Link copied to clipboard

创建一个可并发修改的列表,其遍历操作在并发修改的情况下仍然是安全的:当一个线程正在修改列表时,另一个线程遍历该列表会看到列表的稳定状态(即未被修改的数据),从而避免出现异常(永远不会抛出错误)。 ConcurrentModificationException.

Link copied to clipboard
actual fun <K : Any, V : Any> concurrentMutableMapOf(): MutableMap<K, V>
expect fun <K : Any, V : Any> concurrentMutableMapOf(): MutableMap<K, V>

创建一个可并发修改的、可变类型的映射(map)。