blob: ae29c51a437899a881e8b9180c3f1c73332e6d11 [file] [log] [blame]
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package kotlinx.coroutines.experimental.internal
import java.util.concurrent.*
import kotlin.concurrent.withLock as withLockJvm
internal actual fun <E> subscriberList(): MutableList<E> = CopyOnWriteArrayList<E>()
@Suppress("ACTUAL_WITHOUT_EXPECT")
internal actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock
internal actual inline fun <T> ReentrantLock.withLock(action: () -> T) = this.withLockJvm(action)