title: Room void methods on main thread
body: <p>When using the Room library for Android the documentation clearly states that we cannot make calls on the main thread unless we specifically allow them. What I'm curious about is methods that have a <code>void</code> return type. It seems silly that returning <code>LiveData</code> will automatically run them off the main thread, but void types will not (unless I'm missing something). Is there any easy way I can do this without having to run this in my own managed thread?</p>
  
  <p>My Query:</p>
  
  <pre><code>@Dao
  interface UserDao {
      @Query("DELETE FROM users")
      fun clear()
  }
  </code></pre>
  
  <p>I've even tried using Kotlin reflection + extension functions, but this seemed to fail during runtime:</p>
  
  <pre><code>fun KFunction&lt;Unit&gt;.execOn(executor: Executor, vararg args: Any?) {
      executor.execute {
          this.call(args)
      }
  }
  </code></pre>
  
  <p>Then make a call like:</p>
  
  <pre><code>myDb.userDao()::clear.execOn(diskExecutor)
  </code></pre>
  
  <p>Note what does work is:</p>
  
  <pre><code>diskExecutor.execute {
      myDb.userDao().clear()
  }
  </code></pre>