Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, in the following code, the @Unique("return") annotation documents that the object returned from the constructor is a unique reference.:

Code Block
bgColor#ccccff
 @RegionLock("Lock is this protects Instance")
 public final class Example {
   private int x = 1;
   private int y;

   @Unique("return")
   public Example(int y) {
     this.y = y;
   }
   // ...
 }

...

[Bloch 2008]

Item 70, "Document Thread Safety"

[Goetz 2006]

 Java Concurrency in Practice

[Sutherland 2010]

 Composable Thread Coloring

 

...