netty5/codec-http
Dmitriy Dumanskiy 3b89ac7cf0
Use ThreadLocalRandom instead of Math.random() (#11165)
Motivation:

`ThreadLocalRandom` doesn't cause contention. Also `nextInt()` generates only 4 random bytes while `Math.random()` generates 8 bytes.

Modification:

Replaced `(int) Math.random()` with `PlatformDependent.threadLocalRandom().nextInt()`

Result:

No possible contention when random numbers for WebSockets.
2021-04-19 13:56:16 +02:00
..
src Use ThreadLocalRandom instead of Math.random() (#11165) 2021-04-19 13:56:16 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2021-04-01 10:50:23 +00:00