3 ms·
> optional interrupt send to the thread running the blocking operation I'm not 100% sure on what you mean by an optional interrupt, but I'm guessing it's the b
by mrkeen 7y ago
> optional interrupt send to the thread running the blocking operation
I'm not 100% sure on what you mean by an optional interrupt, but I'm guessing it's the boolean flag on the cancel(); Let's look!
public boolean cancel(boolean mayInterruptIfRunning) {
boolean cancelled = this.result == null && this.internalComplete(new CompletableFuture.AltResult(new CancellationException()));
this.postComplete();
return cancelled || this.isCancelled();
}
Doesn't look like it's used.
- lenkite 7y agoYou are right. Even the javadoc says that `CompletableFuture` doesn't support this. Bah! will force me read the fine print next time. mayInterruptIfRunning - this value has no effect in this implementation because interrupts are not used to control processing.