title: How to post callbacks in Android to any arbitrary thread
body: <p>I am using the Unity game engine which also supports exporting to Android.</p>
  
  <p>The engine uses multiple threads, including the UI thread and a separate scripting thread where all the user custom code is executing.</p>
  
  <p>My scenario requires that i call some operation in a background thread, and i would like to marshal the result back to the main scripting thread.</p>
  
  <p>I know the basics of the <a href="http://developer.android.com/reference/android/os/AsyncTask.html" rel="nofollow">AsyncTask</a>, <a href="http://developer.android.com/reference/java/util/concurrent/Executor.html" rel="nofollow">Executor</a> and <a href="http://developer.android.com/reference/android/os/Looper.html" rel="nofollow">Looper</a> classes. Out of these, Looper seems like a good candidate since it allows setting up a queue and post back messages to a given thread (AsyncTask is "hardwired" to run the callback on the UI thread, which is not what i want here).</p>
  
  <p>What is the proper way of achieving this?</p>