ThreadRef

class ThreadRef(val thread: Thread, val handler: Handler)

The thread used by the VoiceClient for callbacks and other operations.

Constructors

Link copied to clipboard
constructor(thread: Thread, handler: Handler)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Throws an exception if this thread is not the current thread.

fun <R> assertCurrent(action: () -> R): R
Link copied to clipboard

Returns true if this thread is the current thread.

Link copied to clipboard
fun runOnThread(action: Runnable)

Runs the specified Runnable on this thread. If this thread is the current thread, this will be executed immediately.

Link copied to clipboard
fun <V, E> runOnThreadReturningFuture(action: () -> Future<V, E>): Future<V, E>

Runs the specified action on this thread, returning a Future to the original thread.