suspend 함수 내의 runBlocking 호출을 참조합니다.
Using runBlocking within a suspend function blocks the calling thread and defeats the purpose of asynchronous programming.
The quick-fix replaces the runBlocking call with one of the following alternatives, depending on the context:
run 호출.withContext call when a specific CoroutineContext is used.runBlocking wrapper.예:
suspend fun something() {
runBlocking {
code() // 여기서 스레드가 막힙니다
}
}
빠른 수정을 적용한 후:
suspend fun something() {
code() // 비동기 실행
}
2025.1에서 추가