netty5/common/src/test
Nick Hill 0280bd2063 Avoid CancellationException construction in DefaultPromise (#9534)
Motivation

problem with Throwable#addSuppressed() raised in #9151. This introduced
a performance issue when promises are cancelled at a high frequency due
to the construction cost of CancellationException at the time that
DefaultPromise#cancel() is called.

Modifications

- Reinstate the prior static CANCELLATION_CAUSE_HOLDER but use it just
as a sentinel to indicate cancellation, constructing a new
CancellationException only if/when one needs to be explicitly
returned/thrown
- Subclass CancellationException, overriding fillInStackTrace() to
minimize the construction cost in these cases

Result

Promises are much cheaper to cancel. Fixes #9522.
2019-09-05 11:10:55 +02:00
..
java/io/netty/util Avoid CancellationException construction in DefaultPromise (#9534) 2019-09-05 11:10:55 +02:00
resources Add logging configuration to pom.xml 2016-05-09 15:18:01 +02:00
templates/io/netty/util/collection Add test for Iterator.remove() on KObjectHashMap.values().iterator() (#8891) 2019-02-27 12:06:46 +01:00