dev-resources.site
for different kinds of informations.
Iterating collections and arrays in parallel by setting thread priority
Published at
11/16/2021
Categories
java
tutorial
programming
Author
Roberto Gentili
Through the underlying configurable BackgroundExecutor the IterableObjectHelper component is able to iterate a collection or an array in parallel and execute an action on each iterated item giving also the ability to set the threads priority. Before starting to use this component we need to add the following dependency to our pom.xml:
… And now let’s see the code:
Articles
12 articles in total
Iterating collections and arrays in parallel by setting thread priority
currently reading
How to generate and compile sources at runtime in Java
read article
Making applications created with old Java versions work on Java 9 and later versions
read article
Invoking and handling privates and all other methods of an object with and without the use of Reflection in Java
read article
How to scan the file system in Java
read article
Executing stringified source code in Java
read article
A fast and flexible way to scan the class paths in Java
read article
Generating classes at runtime and invoking their methods with and without the use of Reflection in Java
read article
How to bind methods or constructors to functional interfaces in Java
read article
Optimizing CPU usage by performing tasks in parallel with different priorities in Java
read article
How to get field values with Reflection and with direct memory access in Java
read article
How to find all the classes of a package in Java
read article
Featured ones: