webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Static Public Member Functions | List of all members
org.webrtc.ThreadUtils Class Reference

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)
 

Member Function Documentation

◆ awaitUninterruptibly() [1/2]

static void org.webrtc.ThreadUtils.awaitUninterruptibly ( final CountDownLatch  latch)
inlinestatic

◆ awaitUninterruptibly() [2/2]

static boolean org.webrtc.ThreadUtils.awaitUninterruptibly ( CountDownLatch  barrier,
long  timeoutMs 
)
inlinestatic

◆ checkIsOnMainThread()

static void org.webrtc.ThreadUtils.checkIsOnMainThread ( )
inlinestatic

Throws exception if called from other than main thread.

◆ executeUninterruptibly()

static void org.webrtc.ThreadUtils.executeUninterruptibly ( BlockingOperation  operation)
inlinestatic

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.

◆ invokeAtFrontUninterruptibly() [1/2]

static <V> V org.webrtc.ThreadUtils.invokeAtFrontUninterruptibly ( final Handler  handler,
final Callable< V >  callable 
)
inlinestatic

Post |callable| to |handler| and wait for the result.

◆ invokeAtFrontUninterruptibly() [2/2]

static void org.webrtc.ThreadUtils.invokeAtFrontUninterruptibly ( final Handler  handler,
final Runnable  runner 
)
inlinestatic

Post |runner| to |handler|, at the front, and wait for completion.

◆ joinUninterruptibly() [1/2]

static boolean org.webrtc.ThreadUtils.joinUninterruptibly ( final Thread  thread,
long  timeoutMs 
)
inlinestatic

◆ joinUninterruptibly() [2/2]

static void org.webrtc.ThreadUtils.joinUninterruptibly ( final Thread  thread)
inlinestatic

◆ waitUninterruptibly()

static void org.webrtc.ThreadUtils.waitUninterruptibly ( final Object  object)
inlinestatic

The documentation for this class was generated from the following file: