第二个 Android 11 开发者预览版现已推出,快来测试并分享您的反馈吧

SynchronousExecutor

public class SynchronousExecutor
extends Object implements Executor

java.lang.Object
   ↳ androidx.work.testing.SynchronousExecutor


Is an implementation of a Executor which executes Runnable's synchronously.

Summary

Public constructors

SynchronousExecutor()

Public methods

void execute(Runnable command)

Inherited methods

Public constructors

SynchronousExecutor

public SynchronousExecutor ()

Public methods

execute

public void execute (Runnable command)

Parameters
command Runnable