Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Synchronizers  RSS feed

 
Andrew Cane
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the new synchronizers available in Java 1.5 and above? Is it recommended to use them over wait/notify completely? thanks
I only know of:
1. Barrier --> implementations : CyclicBarrier, ...(any other?)
2. Latch --> impl : CountDownLatch,....(any other?)
3. Semaphore --> impl : CountingSemaphore,...(any other?)
.......(any other synchronizers?)

thanks
 
Henry Wong
author
Sheriff
Posts: 22846
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew Cane wrote:What are the new synchronizers available in Java 1.5 and above? Is it recommended to use them over wait/notify completely? thanks


If you are looking for a replacement for the wait/notify mechanism, then take a look at the java.util.concurrent.locks.Lock, java.util.concurrent.locks.ReentrantLock, and java.util.concurrent.locks.Condition class/interfaces.

Henry
 
Andrew Cane
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, but is there any other synchronizer I missed out in my first post? thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!