1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-05 01:26:23 +00:00

Add comment explaining usage Schedulers.trampoline in detail

This commit is contained in:
XiangRongLin 2021-07-06 16:13:16 +02:00
parent 56ea526cce
commit 2aa5f68b7b

View File

@ -8,7 +8,10 @@ import org.junit.runner.Description
import org.junit.runners.model.Statement
/**
* Always run on [Schedulers.trampoline]
* Always run on [Schedulers.trampoline].
* This executes the task in the current thread in FIFO manner.
* This ensures that tasks are run quickly inside the tests
* and not scheduled away to another thread for later execution
*/
class TrampolineSchedulerRule : TestRule {