-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Java 17 was used. Yet in current Java 20 the javadoc looks the same.
A DESCRIPTION OF THE PROBLEM :
Goal:
The goal of this bug ticket is to mitigate the risk of falling into the same first pitfall for a lot of other people working the first time with ConcurrentHashMap and spent a lot of time debugging as it is not expected for them.
Background:
A few days ago I encountered a bug on our live system because I misread the javadoc of ConcurrentHashMap.forEachKey.
If I would have read the part about parallelismThreshold in the class javadoc everything would have been clear to me.
I anticipated that parallelismThreshold is the amount of threads which are used to execute.
I wish that it's more clear that "parallelismThreshold" had more kind of a "chunk size" / "batch size" naming, which is from my point of view more widely used as a name for this. Yet I guess I understand where the name parallelismThreshold is coming from.
Or at least a more detailed description in the parameter javadoc and link to the class javadoc.
Java 17 was used. Yet in current Java 20 the javadoc looks the same.
A DESCRIPTION OF THE PROBLEM :
Goal:
The goal of this bug ticket is to mitigate the risk of falling into the same first pitfall for a lot of other people working the first time with ConcurrentHashMap and spent a lot of time debugging as it is not expected for them.
Background:
A few days ago I encountered a bug on our live system because I misread the javadoc of ConcurrentHashMap.forEachKey.
If I would have read the part about parallelismThreshold in the class javadoc everything would have been clear to me.
I anticipated that parallelismThreshold is the amount of threads which are used to execute.
I wish that it's more clear that "parallelismThreshold" had more kind of a "chunk size" / "batch size" naming, which is from my point of view more widely used as a name for this. Yet I guess I understand where the name parallelismThreshold is coming from.
Or at least a more detailed description in the parameter javadoc and link to the class javadoc.