Removed thread specific code from coroutine

This commit is contained in:
nathan 2020-09-09 11:03:47 +02:00
parent 3e4e4abb49
commit db992d98a9

View File

@ -61,22 +61,14 @@ class CoroutineSleepingMillisIdleStrategy : CoroutineIdleStrategy {
if (workCount > 0) { if (workCount > 0) {
return return
} }
try { delay(sleepPeriodMs)
delay(sleepPeriodMs)
} catch (ignore: InterruptedException) {
Thread.currentThread().interrupt()
}
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
override suspend fun idle() { override suspend fun idle() {
try { delay(sleepPeriodMs)
delay(sleepPeriodMs)
} catch (ignore: InterruptedException) {
Thread.currentThread().interrupt()
}
} }
/** /**