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
36
36
public interface Mutex {
37
37
/* *
38
38
* Factory for [Mutex] instances.
39
+ * @suppress **Deprecated**
39
40
*/
40
41
public companion object Factory {
41
42
/* *
42
43
* Creates new [Mutex] instance.
43
- * @param locked initial state of the mutex.
44
+ * @suppress **Deprecated**
44
45
*/
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)
46
48
}
47
49
48
50
/* *
@@ -96,6 +98,12 @@ public interface Mutex {
96
98
public fun unlock (owner : Any? = null)
97
99
}
98
100
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
+
99
107
/* *
100
108
* Executes the given [action] under this mutex's lock.
101
109
* @return the return value of the action.
You can’t perform that action at this time.
0 commit comments