File tree 15 files changed +22
-10
lines changed
15 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import kotlinx.coroutines.internal.*
9
9
import kotlin.coroutines.*
10
10
import kotlin.coroutines.intrinsics.*
11
11
import kotlin.jvm.*
12
+ import kotlin.native.concurrent.*
12
13
13
14
private const val UNDECIDED = 0
14
15
private const val SUSPENDED = 1
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import kotlinx.atomicfu.*
8
8
import kotlinx.coroutines.internal.*
9
9
import kotlin.coroutines.*
10
10
import kotlin.jvm.*
11
+ import kotlin.native.concurrent.*
11
12
12
13
/* *
13
14
* Extended by [CoroutineDispatcher] implementations that have event loop inside and can
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import kotlin.coroutines.*
13
13
import kotlin.coroutines.intrinsics.*
14
14
import kotlin.js.*
15
15
import kotlin.jvm.*
16
+ import kotlin.native.concurrent.*
16
17
17
18
/* *
18
19
* A concrete implementation of [Job]. It is optionally a child to a parent job.
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import kotlinx.coroutines.intrinsics.*
11
11
import kotlinx.coroutines.selects.*
12
12
import kotlin.coroutines.*
13
13
import kotlin.jvm.*
14
+ import kotlin.native.concurrent.*
14
15
15
16
/* *
16
17
* Abstract send channel. It is a base class for all send channel implementations.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import kotlinx.coroutines.internal.*
10
10
import kotlinx.coroutines.intrinsics.*
11
11
import kotlinx.coroutines.selects.*
12
12
import kotlin.jvm.*
13
+ import kotlin.native.concurrent.*
13
14
14
15
/* *
15
16
* Broadcasts the most recently sent element (aka [value]) to all [openSubscription] subscribers.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package kotlinx.coroutines.flow.internal
6
6
7
7
import kotlinx.coroutines.internal.*
8
8
import kotlin.jvm.*
9
+ import kotlin.native.concurrent.*
9
10
10
11
/* *
11
12
* This value is used a a surrogate `null` value when needed.
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ package kotlinx.coroutines.internal
7
7
import kotlinx.atomicfu.atomic
8
8
import kotlinx.coroutines.*
9
9
import kotlin.jvm.*
10
+ import kotlin.native.concurrent.*
10
11
11
12
/* *
12
13
* The most abstract operation that can be in process. Other threads observing an instance of this
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
5
package kotlinx.coroutines.internal
@@ -22,7 +22,3 @@ internal expect class ReentrantLock() {
22
22
internal expect inline fun <T > ReentrantLock.withLock (action : () -> T ): T
23
23
24
24
internal expect fun <E > identitySet (expectedSize : Int ): MutableSet <E >
25
-
26
- @ExperimentalMultiplatform
27
- @OptionalExpectation
28
- internal expect annotation class SharedImmutable ()
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import kotlinx.atomicfu.*
8
8
import kotlinx.coroutines.internal.*
9
9
import kotlin.coroutines.*
10
10
import kotlin.jvm.*
11
+ import kotlin.native.concurrent.*
11
12
12
13
@SharedImmutable
13
14
private val UNDEFINED = Symbol (" UNDEFINED" )
Original file line number Diff line number Diff line change 5
5
package kotlinx.coroutines.internal
6
6
7
7
import kotlin.jvm.*
8
+ import kotlin.native.concurrent.*
8
9
9
10
/* * @suppress **This is unstable API and it is subject to change.** */
10
11
public expect open class LockFreeLinkedListNode () {
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import kotlinx.coroutines.sync.*
13
13
import kotlin.coroutines.*
14
14
import kotlin.coroutines.intrinsics.*
15
15
import kotlin.jvm.*
16
+ import kotlin.native.concurrent.*
16
17
17
18
/* *
18
19
* Scope for [select] invocation.
@@ -213,6 +214,7 @@ internal class SeqNumber {
213
214
fun next () = number.incrementAndGet()
214
215
}
215
216
217
+ @SharedImmutable
216
218
private val selectOpSequenceNumber = SeqNumber ()
217
219
218
220
@PublishedApi
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import kotlinx.coroutines.intrinsics.*
11
11
import kotlinx.coroutines.selects.*
12
12
import kotlin.coroutines.*
13
13
import kotlin.jvm.*
14
+ import kotlin.native.concurrent.*
14
15
15
16
/* *
16
17
* Mutual exclusion for coroutines.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
+ */
4
+
1
5
package kotlinx.coroutines.sync
2
6
3
7
import kotlinx.atomicfu.*
@@ -6,6 +10,7 @@ import kotlinx.coroutines.internal.*
6
10
import kotlin.coroutines.*
7
11
import kotlin.jvm.*
8
12
import kotlin.math.*
13
+ import kotlin.native.concurrent.*
9
14
10
15
/* *
11
16
* A counting semaphore for coroutines that logically maintains a number of available permits.
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
5
package kotlinx.coroutines
6
6
7
7
import kotlin.coroutines.*
8
+ import kotlin.native.concurrent.*
8
9
9
10
private fun takeEventLoop (): EventLoopImpl =
10
11
ThreadLocalEventLoop .currentOrNull() as ? EventLoopImpl ? :
@@ -26,6 +27,7 @@ internal fun loopWasShutDown(): Nothing = error("Cannot execute task because eve
26
27
internal actual fun createDefaultDispatcher (): CoroutineDispatcher =
27
28
DefaultExecutor
28
29
30
+ @SharedImmutable
29
31
internal actual val DefaultDelay : Delay = DefaultExecutor
30
32
31
33
public actual fun CoroutineScope.newCoroutineContext (context : CoroutineContext ): CoroutineContext {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
5
package kotlinx.coroutines.internal
@@ -16,6 +16,3 @@ internal class NoOpLock {
16
16
internal actual fun <E > subscriberList (): MutableList <E > = CopyOnWriteList <E >()
17
17
18
18
internal actual fun <E > identitySet (expectedSize : Int ): MutableSet <E > = HashSet ()
19
-
20
- @Suppress(" ACTUAL_WITHOUT_EXPECT" )
21
- internal actual typealias SharedImmutable = kotlin.native.concurrent.SharedImmutable
You can’t perform that action at this time.
0 commit comments