Aug 172012
 

There are many ways to update a value atomically, so without introducing racing conditions in multithreaded environments. A well-performing way of doing this in Java is to use an AtomicReference or one of its companion classes in the package java.util.concurrent.atomic. However, using an AtomicReference is quite cumbersome. But with Scala, you can easily factor out the cumbersome usage pattern like follows. Continue reading »

 Comments Off on Generic CAS (compare-and-set) for Scala  Tagged with: ,
Sep 132011
 

I’m sick of Java’s low abstraction level which implies lots of coding overhead/boilerplate, so I’ve just started looking at Scala. While the language is definitely appealing, setting up my tool chain was not such a pleasant ride because the information I needed was dispersed across many web pages and well hidden between obsoleted or misleading information. This post shows what I did to succeed so you can use it as a guide line. Continue reading »

 Comments Off on How to set up Scala 2.8.1 with NetBeans 7.0.1 and Maven 3.0.3  Tagged with: , ,