MessageQueueThread

Encapsulates a Thread that can accept Runnables.

Inheritors

Functions

Link copied to clipboard
abstract fun assertIsOnThread()

Asserts isOnThread, throwing a AssertionException (NOT an AssertionError) if the assertion fails.

abstract fun assertIsOnThread(message: String)

Asserts isOnThread, throwing a AssertionException (NOT an AssertionError) if the assertion fails. The given message is appended to the error.

Link copied to clipboard
abstract fun <T> callOnQueue(callable: Callable<T>): Future<T>

Runs the given Callable on this Thread. It will be submitted to the end of the event queue even if it is being submitted from the same queue Thread.

Link copied to clipboard

Returns the perf counters taken when the framework was started. This method is intended to be used for instrumentation purposes.

Link copied to clipboard
abstract fun isIdle(): Boolean

Resets the perf counters. This is useful if the RN threads are being re-used. This method is intended to be used for instrumentation purposes.

Link copied to clipboard
abstract fun isOnThread(): Boolean

Tells whether the current Thread is also the Thread associated with this MessageQueueThread.

Link copied to clipboard
abstract fun quitSynchronous()

Quits this MessageQueueThread. If called from this MessageQueueThread, this will be the last thing the thread runs. If called from a separate thread, this will block until the thread can be quit and joined.

Link copied to clipboard
abstract fun resetPerfStats()

Resets the perf counters. This is useful if the RN threads are being re-used. This method is intended to be used for instrumentation purposes.

Link copied to clipboard
abstract fun runOnQueue(runnable: Runnable): Boolean

Runs the given Runnable on this Thread. It will be submitted to the end of the event queue even if it is being submitted from the same queue Thread.