Examples from the java concurrency cookbook