~!Hacked By GeNErAL alias Mathis!~ Hacked By GeNErAL Greetz : Kuroi’SH, RxR, ~ \!/Just for Fun ~Hacked By GeNErAL\!/ Hacked By GeNErAL! !
Java has a huge amount of useful collections and several are made specifically for use in concurrent code like the ConcurrentHashMap. Two sometimes very useful classes are the CopyOnWriteArrayList and CopyOnWriteArraySet. They implement the java.util.List and the java.util.Set interface respectively. Let’s focus on the CopyOnWriteArrayList to understand what it is all about. Contrary to the […]
I just read this announcement about Reducers – a library and model for collection processing. What I really like are the capabilities to process collections in parallel using Java’s Fork/Join Framework with the new fold function. This is a great addition to Clojure – and a great time to add Clojure to your programming toolkit. […]
When doing concurrency with C++ you have many choices incl: Posix threads: Very low level, rather ugly C API, avoid if possible. C++11 concurrency features: Very interesting and good stuff, no full compiler support yet but some things already usable with some compilers. Boost: Has many good things, close to the features in C++11. Ready […]
The java.util.concurrent.CompletionService is a useful interface in the JDK standard libraries but few developers know it. One could live without it as you can of course program this functionality with the other interfaces and classes within java.util.concurrent but it is convenient to have a solution that is already available and less error prone then doing […]
In this post we look at the aggregate method available in the Scala collection library. It may look a little intimidating at first but can really be your friend when you can do something in parallel using Scala’s parallel collections. As an example we will count the words in a file. Our sample file has […]
With some applications that use several threads there are situations where one thread can only start after some others have completed. For example, image a program that downloads a bunch of web pages, zips them and send then the zip file via email. If you program this in a multithreaded way, the thread that zips […]
Immutable classes have been a hot topic lately. The rise of functional languages who operate mostly on immutable data and the advantage of immutable data when using multiple threads (correct immutable classes are thread safe) have also created a new interest in immutable data in Java. While some languages like Scala encourage (but do not […]