Skip to content

Commit 73bd3a9

Browse files
committed
Add more @InternalCoroutinesApi to internal package
1 parent 1fba6d2 commit 73bd3a9

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

core/kotlinx-coroutines-core/src/internal/LockFreeLinkedList.kt

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package kotlinx.coroutines.experimental.internal
66

77
import kotlinx.atomicfu.*
8+
import kotlinx.coroutines.experimental.*
89

910
private typealias Node = LockFreeLinkedListNode
1011

@@ -53,6 +54,7 @@ public actual typealias AbstractAtomicDesc = LockFreeLinkedListNode.AbstractAtom
5354
* @suppress **This is unstable API and it is subject to change.**
5455
*/
5556
@Suppress("LeakingThis")
57+
@InternalCoroutinesApi
5658
public actual open class LockFreeLinkedListNode {
5759
private val _next = atomic<Any>(this) // Node | Removed | OpDescriptor
5860
private val _prev = atomic<Any>(this) // Node | Removed

core/kotlinx-coroutines-core/src/internal/LockFreeMPSCQueue.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package kotlinx.coroutines.experimental.internal
66

77
import kotlinx.atomicfu.*
8+
import kotlinx.coroutines.experimental.*
89
import java.util.concurrent.atomic.*
910

1011
private typealias Core<E> = LockFreeMPSCQueueCore<E>
@@ -22,7 +23,8 @@ private typealias Core<E> = LockFreeMPSCQueueCore<E>
2223
*
2324
* @suppress **This is unstable API and it is subject to change.**
2425
*/
25-
class LockFreeMPSCQueue<E : Any> {
26+
@InternalCoroutinesApi
27+
internal class LockFreeMPSCQueue<E : Any> {
2628
private val _cur = atomic(Core<E>(Core.INITIAL_CAPACITY))
2729

2830
// Note: it is not atomic w.r.t. remove operation (remove can transiently fail when isEmpty is false)

core/kotlinx-coroutines-core/src/internal/ThreadSafeHeap.kt

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import java.util.*
1010
/**
1111
* @suppress **This is unstable API and it is subject to change.**
1212
*/
13+
@InternalCoroutinesApi
1314
public interface ThreadSafeHeapNode {
1415
public var heap: ThreadSafeHeap<*>?
1516
public var index: Int
@@ -20,6 +21,7 @@ public interface ThreadSafeHeapNode {
2021
*
2122
* @suppress **This is unstable API and it is subject to change.**
2223
*/
24+
@InternalCoroutinesApi
2325
public class ThreadSafeHeap<T> : SynchronizedObject() where T: ThreadSafeHeapNode, T: Comparable<T> {
2426
private var a: Array<T?>? = null
2527

core/kotlinx-coroutines-core/src/scheduling/Dispatcher.kt

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ internal object DefaultScheduler : ExperimentalCoroutineDispatcher() {
2626
* @suppress **This is unstable API and it is subject to change.**
2727
*/
2828
// TODO make internal (and rename) after complete integration
29+
@InternalCoroutinesApi
2930
open class ExperimentalCoroutineDispatcher(
3031
private val corePoolSize: Int,
3132
private val maxPoolSize: Int,

0 commit comments

Comments
 (0)