• Concurrency
  • Java concurrency: Understanding CopyOnWriteArrayList and CopyOnWriteArraySet

    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 […]

  • C/C++
  • Getting started with Eclipse CDT, Threading Building Blocks, parallel_for and C++11 lambdas

    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 […]

  • Concurrency
  • How to make Java classes immutable

    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 […]