The purpose of most (if not all) synchronizers is to guard some area of the code (critical section) from concurrent access by threads. To do this the following parts are often needed in a synchronizer:

  1. State
  2. Access Condition
  3. State Changes
  4. Notification Strategy
  5. Test and Set Method
  6. Set Method

Not all synchronizers have all of these parts, and those that have may not have them exactly as they are described here. Usually you can find one or more of these parts, though.

Very good summary of Locks

results matching ""

    No results matching ""