ThreadTestUtil
@UnstableApi
class ThreadTestUtil
Static utility to coordinate threads in testing environments.
Summary
Public functions |
|
|---|---|
java-static Unit |
registerThreadIsBlockedUntilProgressOnLooper(Registers that the current thread will be blocked with the provided |
java-static Unit |
Unblocks any threads that are waiting for progress on the current |
java-static Unit |
Unblocks any threads that are waiting for progress on the specified |
Public functions
registerThreadIsBlockedUntilProgressOnLooper
java-static fun registerThreadIsBlockedUntilProgressOnLooper(
conditionVariable: ConditionVariable!,
looper: Looper!
): Unit
Registers that the current thread will be blocked with the provided ConditionVariable until the specified Looper reports to have made progress via unblockThreadsWaitingForProgressOnCurrentLooper.
| Parameters | |
|---|---|
conditionVariable: ConditionVariable! |
The |
looper: Looper! |
The |
unblockThreadsWaitingForProgressOnCurrentLooper
java-static fun unblockThreadsWaitingForProgressOnCurrentLooper(): Unit
Unblocks any threads that are waiting for progress on the current Looper thread.
unblockThreadsWaitingForProgressOnLooper
java-static fun unblockThreadsWaitingForProgressOnLooper(looper: Looper!): Unit
Unblocks any threads that are waiting for progress on the specified Looper thread.