Missing Cancellation Check (ARCH8024)
هذا المحتوى غير متوفر بلغتك بعد.
Key kotlin.async.missing-cancellation-check · Severity warning · Category async
Flags loops inside coroutines that do work but never suspend or check isActive / ensureActive() - cancellation cannot reach them. A loop that only moves values between local collections is out of scope.
Incorrect
Section titled “Incorrect”launch { while (true) { poll() } }Correct
Section titled “Correct”launch { while (isActive) { poll(); delay(100) } }Loop on isActive, call ensureActive() or yield() / delay() inside the loop.