Skip to content

Commit ac7bc3c

Browse files
committed
Style
1 parent 0a76a08 commit ac7bc3c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

kotlinx-coroutines-core/common/src/internal/OnDemandAllocatingPool.kt renamed to kotlinx-coroutines-core/concurrent/src/internal/OnDemandAllocatingPool.kt

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ import kotlinx.atomicfu.*
1111
*
1212
* [maxCapacity] is the maximum amount of elements.
1313
* [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.
1417
*/
1518
internal class OnDemandAllocatingPool<T>(
1619
private val maxCapacity: Int,
1720
private val create: (Int) -> T
1821
) {
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+
*/
2126
private val controlState = atomic(0)
2227
private val elements = atomicArrayOfNulls<T>(maxCapacity)
2328

0 commit comments

Comments
 (0)