Thread: Annotation in Thread Synchronization and concurrency

Forum : Threads and Synchronization   08-11-2018 11:31:31 PM
User Image
Balram777

Newbie

Joined: Feb 19, 2018

Points: 110

Threads: 5

Posts: 10

Annotation in Thread Synchronization and concurrency

| Quote Date : Nov 8, 2018    Views:134    

In a book "concurrency in practice" they have heavily used some annotation related to threading like @ThreadSafe, @NotThreadSafe, @GuardedBy, @Immutable. these are not the part of core jdk api but these are part of external  dependency net.jcip. Now my question is that still application is running in JVM only and JVM only reading those annotations. So is there any significance of writing those annotation or those are just to mark classes a that these are thread safe or these are not thread safe for better readability?

Comments

User Image
Amritk

Newbie

Joined : May 8, 2017

Points : 230

Threads: 57

Posts: 216

Re: Annotation in Thread Synchronization and concurrency

Reply Date : Nov 9, 2018

these annotation are not in JDK. These annotations are created manually for understanding purpose.

Load More

No More Comments