接口的使用
cn.wjybxx.concurrent.ICancelTokenSource
使用ICancelTokenSource的程序包
-
cn.wjybxx.concurrent中ICancelTokenSource的使用
修饰符和类型方法说明default ICancelTokenSourceICancelTokenSource.newInstance()ICancelTokenSource.newInstance(boolean copyCode) 创建一个同类型实例。参数类型为ICancelTokenSource的cn.wjybxx.concurrent中的方法修饰符和类型方法说明CancelTokenSource.thenTransferTo(ICancelTokenSource child) CancelTokenSource.thenTransferTo(ICancelTokenSource child, int options) ICancelToken.thenTransferTo(ICancelTokenSource child) ICancelToken.thenTransferTo(ICancelTokenSource child, int options) 该接口用于方便构建子上下文 1.子token会在当前token进入取消状态时被取消 2.该接口本质是一个快捷方法,但允许子类优化ReadonlyCancelToken.thenTransferTo(ICancelTokenSource child) ReadonlyCancelToken.thenTransferTo(ICancelTokenSource child, int options) CancelTokenSource.thenTransferToAsync(Executor executor, ICancelTokenSource child) CancelTokenSource.thenTransferToAsync(Executor executor, ICancelTokenSource child, int options) ICancelToken.thenTransferToAsync(Executor executor, ICancelTokenSource child) ICancelToken.thenTransferToAsync(Executor executor, ICancelTokenSource child, int options) ReadonlyCancelToken.thenTransferToAsync(Executor executor, ICancelTokenSource child) ReadonlyCancelToken.thenTransferToAsync(Executor executor, ICancelTokenSource child, int options) -
cn.wjybxx.sequential中ICancelTokenSource的使用
参数类型为ICancelTokenSource的cn.wjybxx.sequential中的方法修饰符和类型方法说明UniCancelTokenSource.thenTransferTo(ICancelTokenSource child) UniCancelTokenSource.thenTransferTo(ICancelTokenSource child, int options) UniCancelTokenSource.thenTransferToAsync(Executor executor, ICancelTokenSource child) UniCancelTokenSource.thenTransferToAsync(Executor executor, ICancelTokenSource child, int options)