File tree 1 file changed +7
-2
lines changed
kotlinx-coroutines-core/concurrent/src/internal
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,18 @@ import kotlinx.atomicfu.*
11
11
*
12
12
* [maxCapacity] is the maximum amount of elements.
13
13
* [create] is the function that creates a new element.
14
+ *
15
+ * This is only used in the Native implementation,
16
+ * but is part of the `concurrent` source set in order to test it on the JVM.
14
17
*/
15
18
internal class OnDemandAllocatingPool <T >(
16
19
private val maxCapacity : Int ,
17
20
private val create : (Int ) -> T
18
21
) {
19
- /* * Number of existing elements + isClosed flag in the highest bit.
20
- * Once the flag is set, the value is guaranteed not to change anymore. */
22
+ /* *
23
+ * Number of existing elements + isClosed flag in the highest bit.
24
+ * Once the flag is set, the value is guaranteed not to change anymore.
25
+ */
21
26
private val controlState = atomic(0 )
22
27
private val elements = atomicArrayOfNulls<T >(maxCapacity)
23
28
You can’t perform that action at this time.
0 commit comments