File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/sync Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,15 @@ import kotlin.coroutines.experimental.startCoroutine
3636public interface Mutex {
3737 /* *
3838 * Factory for [Mutex] instances.
39+ * @suppress **Deprecated**
3940 */
4041 public companion object Factory {
4142 /* *
4243 * Creates new [Mutex] instance.
43- * @param locked initial state of the mutex.
44+ * @suppress **Deprecated**
4445 */
45- public operator fun invoke (locked : Boolean = false) : Mutex = MutexImpl (locked)
46+ @Deprecated(" Replaced with top-level function" , level = DeprecationLevel .HIDDEN )
47+ public operator fun invoke (locked : Boolean = false): Mutex = Mutex (locked)
4648 }
4749
4850 /* *
@@ -96,6 +98,12 @@ public interface Mutex {
9698 public fun unlock (owner : Any? = null)
9799}
98100
101+ /* *
102+ * Creates new [Mutex] instance.
103+ * @param locked initial state of the mutex.
104+ */
105+ public fun Mutex (locked : Boolean = false): Mutex = MutexImpl (locked)
106+
99107/* *
100108 * Executes the given [action] under this mutex's lock.
101109 * @return the return value of the action.
You can’t perform that action at this time.
0 commit comments