[Android Kotlin 기초] 6-2. Coroutines and Room

6-2 Coroutines and Room

About Coroutine ?

코루틴의 특징

코루틴의 기능

About Room Database ?

###Answer these questions

Question 1 Which of the following is not a benefit of using coroutines?:

They are non-blocking They run asynchronously. They can be run on a thread other than the main thread. O They always make app runs faster. They can use exceptions. They can be written and read as linear code.

Question 2 Which of the following is not true for suspend functions.?

An ordinary function annotated with the suspend keyword. A function that can be called inside coroutines. O While a suspend function is running, the calling thread is suspended. Suspend functions must always run in the background.

Question 3 Which of the following statements is NOT true?

When execution is blocked, no other work can be executed on the blocked thread. When execution is suspended, the thread can do other work while waiting for the offloaded work to complete. Suspending is more efficient, because threads may not be waiting, doing nothing. O Whether blocked or suspended, execution is still waiting for the result of the coroutine before continuing.