question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Netty 5] Future cancellation

See original GitHub issue

Cancellation 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisvestcommented, Sep 9, 2021

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.

0reactions
NiteshKantcommented, Sep 7, 2021

I agree with @chrisvest here, I do not think removing cancel() is worth the hassle.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found