I am fetching images, videos and music files from android device. I want to run my code in background using three couroutines in parallel without blocking the UI thread.
suspend fun getImages() : ArrayList<VideoData> {
}
suspend fun getVideos() : ArrayList<ImageData> {
}
suspend fun getAudio() : ArrayList<AudioData> {
}
These three functions must execute in parallel. I do not want to wait for all of them to complete. When one function is completed I want to execute some code on main thread i.e UI thread.