title: What is the correct way to use Android Room with Kotlin Coroutines?
body: <p>While learning how to use Kotlin Coroutines recently, have been read several relevant articles. But one of them confuse me: <a href="https://medium.com/androiddevelopers/coroutines-on-android-part-iii-real-work-2ba8a2ec2f45" rel="noreferrer">Coroutines On Android (part III): Real work</a></p>
  
  <p>As it pointed out:</p>
  
  <blockquote>
    <p>Note: Room uses its own dispatcher to run queries on a background
    thread. Your code should not use withContext(Dispatchers.IO) to call
    suspending room queries. It will complicate the code and make your
    queries run slower.</p>
  </blockquote>
  
  <p>It seems to make sense at the time I saw these paragraph, but when I open an Android project and trying to dive into, the problem shows up, Android Studio warns me:</p>
  
  <blockquote>
    <p>suspend function 'yourMethod' should be called only from a coroutine
    or another suspend function</p>
  </blockquote>
  
  <p>I'm now freezing here, because the article told me not to use <code>withContext(Dispatchers.IO)</code>. And I am now wondering should I use <code>withContext(Dispatchers.Main)</code> or use <code>GlobalScope.launch</code> to run my queries?</p>