Skip to content

Commit 2dd5320

Browse files
committed
Cosmetic fixes
1 parent 82547f6 commit 2dd5320

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

common/kotlinx-coroutines-core-common/src/AbstractCoroutine.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,3 @@ public abstract class AbstractCoroutine<in T>(
155155
start(block, receiver, this)
156156
}
157157
}
158-

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ internal class CoroutineScheduler(
251251
companion object {
252252
private const val MAX_SPINS = 1000
253253
private const val MAX_YIELDS = MAX_SPINS + 500
254-
254+
255255
@JvmStatic // Note, that is fits into Int (it is equal to 10^9)
256256
private val MAX_PARK_TIME_NS = TimeUnit.SECONDS.toNanos(1).toInt()
257257

@@ -374,7 +374,7 @@ internal class CoroutineScheduler(
374374
// If we've created the first cpu worker and corePoolSize > 1 then create
375375
// one more (second) cpu worker, so that stealing between them is operational
376376
if (newCpuWorkers == 1 && corePoolSize > 1) createNewWorker()
377-
if (newCpuWorkers > 0) return
377+
if (newCpuWorkers > 0) return
378378
}
379379
// Try unpark again in case there was race between permit release and parking
380380
tryUnpark()
@@ -621,7 +621,7 @@ internal class CoroutineScheduler(
621621
* This attempt may fail either because worker terminated itself or because someone else
622622
* claimed this worker (though this case is rare, because require very bad timings)
623623
*/
624-
fun tryForbidTermination(): Boolean {
624+
fun tryForbidTermination(): Boolean {
625625
val state = terminationState.value
626626
return when (state) {
627627
TERMINATED -> false // already terminated
@@ -672,7 +672,7 @@ internal class CoroutineScheduler(
672672

673673
// Note: it is concurrently reset by idleResetBeforeUnpark
674674
private var parkTimeNs = MIN_PARK_TIME_NS
675-
675+
676676
private var rngState = random.nextInt()
677677
private var lastStealIndex = 0 // try in order repeated, reset when unparked
678678

@@ -699,7 +699,7 @@ internal class CoroutineScheduler(
699699
afterTask(task)
700700
}
701701
}
702-
} catch(e: ShutdownException) {
702+
} catch (e: ShutdownException) {
703703
// race with shutdown -- ignore exception and don't print it on the console
704704
} finally {
705705
tryReleaseCpu(WorkerState.TERMINATED)

0 commit comments

Comments
 (0)