8041772: (ch) PendingFuture.CANCELLED has backtrace that potentially keeps objects alive
Zhong Yu
zhong.j.yu at gmail.com
Tue Apr 29 21:47:44 UTC 2014
This would change the stacktrace the application sees; does it matter?
Previously, if thread X calls cancel(), then thread Y calls get(), Y
will see an exception with Y's stacktrace.
After the change, Y will see an exception with X's stacktrace (which
is always confusing).
Zhong Yu
On Tue, Apr 29, 2014 at 7:55 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> This is an issue that Zhong Yu pointed out recently [1]. Easily fixed by
> removing the static field and creating the CancellationException when the
> cancel method is called:
> http://cr.openjdk.java.net/~alanb/8041772/webrev/
>
> I don't propose to include a test with this specific patch, instead I'd
> prefer to add a more general test that is long running to ensure that there
> aren't any unnecessary objects retained.
>
> -Alan.
>
> [1] http://mail.openjdk.java.net/pipermail/nio-dev/2014-April/002614.html
More information about the nio-dev
mailing list