title: Synchronous image loading on a background thread with Picasso - without .get()
body: <p>I have a custom viewgroup (that contains Picasso-loaded images) that can be reused in two places:</p>
  
  <ol>
  <li>Displayed to the user in the application (on the UI thread)</li>
  <li>Drawn to a canvas and saved as a .jpeg (on the background thread)</li>
  </ol>
  
  <p>My code for drawing to the canvas looks like this:</p>
  
  <pre><code>int measureSpec = View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY);
  view.measure(measureSpec, measureSpec);
  Bitmap bitmap =
        Bitmap.createBitmap(view.getMeasuredWidth(), view.getMeasuredHeight(), Bitmap.Config.ARGB_8888);
  Canvas canvas = new Canvas(bitmap);
  view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
  view.draw(canvas);
  </code></pre>
  
  <p>The problem is that there is no time for the image to load before I draw the view to the canvas.  I'm trying to avoid coupling as much as possible here so I'd prefer not to add a Picasso callback because the class that's doing the drawing doesn't know anything about the view that it's drawing.</p>
  
  <p>I'm currently working around the issue by changing the image loading code to <code>.get()</code> rather than <code>.load()</code> and then using <code>imageView.setImageBitmap()</code>.  Unfortunately, this adds a ton of complexity to the view and I really don't like it.  </p>
  
  <p>What I'd like to do is pass an option to Picasso's RequestCreator that the request should be executed synchronously on the current thread (and throw an exception if it's the main thread).  I wonder if this is too much of an edge case for support to be built directly into Picasso?  Or is it already in the API and I'm oblivious to it?</p>