Minor: Make internal monitorEnter/monitorExit functions private to remove them from the public API
#KT-11485
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
|
||||
package kotlin.jvm.internal.unsafe
|
||||
|
||||
@kotlin.internal.InlineExposed
|
||||
internal fun monitorEnter(@Suppress("UNUSED_PARAMETER") monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
|
||||
private fun monitorEnter(@Suppress("UNUSED_PARAMETER") monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
|
||||
|
||||
@kotlin.internal.InlineExposed
|
||||
internal fun monitorExit(@Suppress("UNUSED_PARAMETER") monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
|
||||
private fun monitorExit(@Suppress("UNUSED_PARAMETER") monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
|
||||
|
||||
@@ -10,13 +10,13 @@ import kotlin.jvm.internal.unsafe.*
|
||||
*/
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun <R> synchronized(lock: Any, block: () -> R): R {
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE", "INVISIBLE_MEMBER")
|
||||
monitorEnter(lock)
|
||||
try {
|
||||
return block()
|
||||
}
|
||||
finally {
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE", "INVISIBLE_MEMBER")
|
||||
monitorExit(lock)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user