kotlin.coroutines.suspendCoroutine の使用箇所を報告し、kotlinx.coroutines 依存関係が存在する場合はそれをkotlinx.coroutines.suspendCancellableCoroutine に置換することを提案します。
suspendCancellableCoroutine 変数は、構造化された並行処理と適切なリソース管理に重要な組み込みのキャンセル処理をサポートしています。
例:
suspend fun usage(): String {
return suspendCoroutine { continuation ->
continuation.resume("Hello!")
}
}
クイックフィックス適用後:
suspend fun usage(): String {
return suspendCancellableCoroutine { continuation ->
continuation.resume("Hello!")
}
}