Create a gist now

Instantly share code, notes, and snippets.

@jdamcd /Thread.java Secret
Last active Sep 22, 2015

What would you like to do?
new Thread() {
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
final String result = Example.blocking();
runOnUiThread(new Runnable() {
@Override
public void run() {
updateUi(result);
}
});
}
}.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment