DeviceConcurrentUtil
public class DeviceConcurrentUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.DeviceConcurrentUtil |
包含用于并发设备端命令执行的实用方法和类
使用ERROR(/ExecutorService)
运行作为ShellCommandCallable
实现的命令,并使用ERROR(/#joinFuture(String,Future,long))
与ERROR(/ExecutorService)
返回的ERROR(/Future)
同步以执行命令。
概括
嵌套类 | |
---|---|
class | DeviceConcurrentUtil.ShellCommandCallable <V> 一个 |
公共方法 | |
---|---|
static <T> T | joinFuture (String taskDesc, task, long timeout) joinFuture (String taskDesc, task, long timeout) 将当前线程加入
|
公共方法
加入未来
public static T joinFuture (String taskDesc,task, long timeout)
将当前线程加入task
的便捷方法
DeviceNotAvailableException
和ERROR(/TimeoutException)
发生在执行过程中透明传递,其他记录为错误但不作其他处理。
参数 | |
---|---|
taskDesc | String :用于记录目的的任务描述 |
task | ERROR(/Future) 表示要加入的任务 |
timeout | long : 等待任务超时 |
退货 | |
---|---|
T | 具有模板类型的任务的结果。 |
投掷 | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
| 超时异常 |
DeviceNotAvailableException |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-03-30。
[]
[]