Coroutines არის Kotlin-ის გამოსავალი asynchronous programming-ისთვის — ასინქრონული კოდის (ქსელის გამოძახებები, მონაცემთა ბაზის ოპერაციები) დაწერა, რომელიც თანმიმდევრობით იკითხება მთავარი ძაფის შეჩერების გარეშე. ეს არის თანამედროვე, რეკომენდირებული გზა ასინქრონული სამუშაოს სამუშაოზე Android-ში, callback-ის სირთულის თავიდან აცილება.
რატომ აქვს მნიშვნელობა asynchronous Android-ში
The MAIN (UI) thread must stay responsive — blocking it (with network/DB work) freezes
the UI (ANR "Application Not Responding" errors):
→ long operations MUST run off the main thread (asynchronously)
→ old approaches: callbacks (nested, complex), threads/AsyncTask (verbose, error-prone)
→ COROUTINES make async code clean and sequential.
