Removed thread specific code from coroutine
This commit is contained in:
parent
3e4e4abb49
commit
db992d98a9
|
@ -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()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user