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 […]
Month: July 2011
BitSets in Scala are much more fun than in Java
Recently I played with BitSets in Java because I needed an efficient way to store huge amounts of long values. For Java there is the java.util.BitSet class. It is a very efficient implementation when you only need to store bit values. Here is a trivial example on how to use it: import java.util.BitSet; public class […]