Sunday, July 3, 2016

Concurrent API

Synchronizers :
  • Semaphore controls access to shared resources. A semaphore maintains a counter to specify number of resources that the semaphore controls.
  • CountDownLatch allows one or more threads to wait for a countdown to complete.
  • The Exchanger class is meant for exchanging data between two threads. This class is useful when two threads need to synchronize between each other and continuously exchange data.
  • CyclicBarrier helps provide a synchronization point where threads may need to wait at a predefined execution point until all other threads reach that point.
  • Phaser is a useful feature when few independent threads have to work in phases to complete a task.
Executor Frame Work:


No comments:

Post a Comment