Agora Java API Reference for Android
|
Classes | |
interface | BlockingOperation |
class | ThreadChecker |
Static Public Member Functions | |
static void | checkIsOnMainThread () |
static void | executeUninterruptibly (BlockingOperation operation) |
static boolean | joinUninterruptibly (final Thread thread, long timeoutMs) |
static void | joinUninterruptibly (final Thread thread) |
static void | awaitUninterruptibly (final CountDownLatch latch) |
static boolean | awaitUninterruptibly (CountDownLatch barrier, long timeoutMs) |
static void | waitUninterruptibly (final Object object) |
static< V > V | invokeAtFrontUninterruptibly (final Handler handler, final Callable< V > callable) |
static void | invokeAtFrontUninterruptibly (final Handler handler, final Runnable runner) |
static StackTraceElement [] | concatStackTraces (StackTraceElement[] inner, StackTraceElement[] outer) |
|
static |
Throws exception if called from other than main thread.
|
static |
Utility method to make sure a blocking operation is executed to completion without getting interrupted. This should be used in cases where the operation is waiting for some critical work, e.g. cleanup, that must complete before returning. If the thread is interrupted during the blocking operation, this function will re-run the operation until completion, and only then re-interrupt the thread.
|
static |
Post |callable| to |handler| and wait for the result.
|
static |
Post |runner| to |handler|, at the front, and wait for completion.