Skip to content

selimober/list-concurrent-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#list-concurrent-processor

Iterates over a list concurrently while processing each item in parallel

##Example usage Takes a list of Foo objects, for every object, it multiplies the value in with 10 and writes the result to out. This example employs 100 threads for this operation. The custom logic is implemented in the Consumer interface. ###Foo.java: public class Foo { public int in; public int out; } ###processor: ListConcurrentProcessor lcp = new QueueListConcurrentProcessor(listOfFoos, 100); lcp.processList(new Consumer() { @Override public void consume(Foo foo) { foo.out = foo.in() * 10; } });

About

Iterates over a list concurrently while processing each item

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages