Vsevolod Tolstopyatov | 9619134 | 2018-04-20 18:13:33 +0300 | [diff] [blame] | 1 | package kotlinx.coroutines.experimental.internal |
| 2 | |
| 3 | import java.util.concurrent.* |
| 4 | import kotlin.concurrent.withLock as withLockJvm |
| 5 | |
Roman Elizarov | 11d6b5b | 2018-04-26 10:11:50 +0300 | [diff] [blame] | 6 | internal actual fun <E> subscriberList(): MutableList<E> = CopyOnWriteArrayList<E>() |
Vsevolod Tolstopyatov | 9619134 | 2018-04-20 18:13:33 +0300 | [diff] [blame] | 7 | |
Roman Elizarov | 11d6b5b | 2018-04-26 10:11:50 +0300 | [diff] [blame] | 8 | @Suppress("ACTUAL_WITHOUT_EXPECT") |
| 9 | internal actual typealias ReentrantLock = java.util.concurrent.locks.ReentrantLock |
Vsevolod Tolstopyatov | 9619134 | 2018-04-20 18:13:33 +0300 | [diff] [blame] | 10 | |
Roman Elizarov | 11d6b5b | 2018-04-26 10:11:50 +0300 | [diff] [blame] | 11 | internal actual inline fun <T> ReentrantLock.withLock(action: () -> T) = this.withLockJvm(action) |