fix: maybe don't block the IO thread for seconds at a time
This commit is contained in:
parent
501084ca58
commit
464f339240
@ -19,6 +19,7 @@ import io.ktor.client.request.*
|
|||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import io.ktor.serialization.kotlinx.json.*
|
import io.ktor.serialization.kotlinx.json.*
|
||||||
import kotlinx.coroutines.coroutineScope
|
import kotlinx.coroutines.coroutineScope
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||||
import kotlinx.coroutines.flow.SharedFlow
|
import kotlinx.coroutines.flow.SharedFlow
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@ -220,7 +221,7 @@ object SDom {
|
|||||||
result.forEach { resultFlow.emit(Result.success(it)) }
|
result.forEach { resultFlow.emit(Result.success(it)) }
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
Thread.sleep(1000)
|
delay(1000)
|
||||||
}
|
}
|
||||||
} while (true)
|
} while (true)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
Loading…
Reference in New Issue
Block a user