Create a new context which is independently cancellable and also cascades cancellation from its parent. Callers must ensure that either CancellableContext#cancel(Throwable) or CancellableContext#detachAndCancel(Context, Throwable) are called at a later point, in order to all
()
| 237 | * </pre> |
| 238 | */ |
| 239 | public CancellableContext withCancellation() { |
| 240 | return new CancellableContext(this); |
| 241 | } |
| 242 | |
| 243 | /** |
| 244 | * Create a new context which will cancel itself after the given {@code duration} from now. |
no outgoing calls