Is there a way to extend or modify the `delay` dur...
# coroutines
s
Is there a way to extend or modify the
delay
duration of a suspended coroutine from another coroutine?
s
Not really, unless you poll:
Copy code
while (mustDelayALittleLonger) delay(100)
If you need to synchronize coroutines, try using a `Job`’s
join
or a `Deferred`’s
await
methods….
c
There’s a test dispatcher (https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-test/src/TestCoroutineDispatcher.kt) that allows for fast-forwarding time in unit tests, so I think you’d have to write your own
CoroutineDispatcher
implementation to do something like that