[Netty 5] Future cancellation
See original GitHub issueCancellation on the Future
API has different meanings for different use cases. For example in I/O at some point we disable cancellation, and often have conditional checks spread throughout the code to check if a Future
is still cancellable. However for scheduled operations cancellation may always be valid. Cancellation creates complexity in the I/O path and may not even make sense for ordered protocols.
We will not support cancellation for I/O operations, but we will support cancellation for scheduled operations.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Future (Netty API Reference (5.0.0.Alpha4))
The new future is uncompleted initially - it is neither succeeded, failed, nor cancelled because the I/O operation is not finished yet.
Read more >Does Netty violate the contract of Future.cancel(...) method?
According the contract from method java.util.concurrent.Future#cancel : After this method returns, subsequent calls to isDone will always return ...
Read more >io.netty.util.concurrent.ScheduledFuture.cancel java ... - Tabnine
@Override public void operationComplete(Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> future) { // Cancel the timeout task. final ...
Read more >Promise (Netty/Common 5.0.0.Alpha2 API) - Javadoc.io
public interface Promise<V> extends Future<V> ... Make this future impossible to cancel. ... Methods inherited from interface io.netty.util.concurrent.
Read more >org.jboss.netty.channel.ChannelFuture - Netty 3.10.5.Final 源码 ...
The new future 34 * is uncompleted initially - it is neither succeeded, failed, nor cancelled 35 * because the I/O operation is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Talked with Norman off-line, and he was also in agreement. I’ll go ahead and close thi. It can be revived if there’s more to discuss.
I agree with @chrisvest here, I do not think removing
cancel()
is worth the hassle.