title: Use blockingGet() on Maybe that already observes on AndroidSchedulers.mainThread()
body: <p>The Room database of my app is wrapped in a RxJava2 data access layer that modifies all Singles, Maybes, etc. to subscribeOn the <strong>Schedulers.io()</strong> scheduler, and observeOn the <strong>AndroidSchedulers.mainThread()</strong> scheduler. </p>
  
  <p>This was considered to be a good idea because sometimes Android misbehaves if you attempt to modify the UI from off of the main thread, which is the typical behavior upon completion of a query.</p>
  
  <pre><code>public &lt;T&gt; Maybe&lt;T&gt; flow(Maybe maybe) {
      return maybe
              .subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread());
  }
  </code></pre>
  
  <p>I now have a part of my app which requires a synchronous retrieval of an element from the database. My design didn't anticipate this. When I execute #blockingGet(), I get deadlock which I've read about in other questions like <a href="https://stackoverflow.com/a/46621156/4672234">this one</a>.</p>
  
  <p>Is there any way to modify the stream to not actually observeOn the main thread in the edge case where I need to synchronously retrieve some data? Or will I have to re-evaluate this design entirely, to let each individual invocation decide which Scheduler is used to observeOn?</p>
  
  <p>--</p>
  
  <p>In my Activity, upon interacting with a UI element:</p>
  
  <pre><code>Book book = mBooksDataSource.getBookWithId(1L)
      .observeOn(Schedulers.io())
      .blockingGet();
  Log.d(LOG_TAG, "I am here."); //Never reached
  </code></pre>
  
  <p>In the DataSource:</p>
  
  <pre><code>public Maybe&lt;Book&gt; getBookWithId(long bookId) {
      return mReservoir.flow(mBooksDao.getBookWithId(bookId));
      //The reservoir is the class containing the flow method from further above.
  }
  </code></pre>
  
  <p>In the BooksDao:</p>
  
  <pre><code>@Transaction @Query("SELECT ...")
  public abstract Maybe&lt;Book&gt; getBookWithId(long bookId);
  </code></pre>