From db992d98a9e0d8e486053055ea14154d6468bfaa Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 9 Sep 2020 11:03:47 +0200 Subject: [PATCH] Removed thread specific code from coroutine --- .../aeron/CoroutineSleepingMillisIdleStrategy.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/dorkbox/network/aeron/CoroutineSleepingMillisIdleStrategy.kt b/src/dorkbox/network/aeron/CoroutineSleepingMillisIdleStrategy.kt index 6af55ecf..e80b6967 100644 --- a/src/dorkbox/network/aeron/CoroutineSleepingMillisIdleStrategy.kt +++ b/src/dorkbox/network/aeron/CoroutineSleepingMillisIdleStrategy.kt @@ -61,22 +61,14 @@ class CoroutineSleepingMillisIdleStrategy : CoroutineIdleStrategy { if (workCount > 0) { return } - try { - delay(sleepPeriodMs) - } catch (ignore: InterruptedException) { - Thread.currentThread().interrupt() - } + delay(sleepPeriodMs) } /** * {@inheritDoc} */ override suspend fun idle() { - try { - delay(sleepPeriodMs) - } catch (ignore: InterruptedException) { - Thread.currentThread().interrupt() - } + delay(sleepPeriodMs) } /**