(file) Return to List.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/List.h between version 1.2 and 1.3

version 1.2, 2006/07/11 18:39:28 version 1.3, 2006/08/09 21:12:42
Line 146 
Line 146 
  
         - NullLock - no locking at all.         - NullLock - no locking at all.
         - Mutex - non-recursive mutex.         - Mutex - non-recursive mutex.
         - RecursiveMutex - recursive mutex.          - Mutex - recursive mutex.
  
     Now we consider an example. So you want to create a list of Person     Now we consider an example. So you want to create a list of Person
     elements. First you must derive from the Linkable class as shown below.     elements. First you must derive from the Linkable class as shown below.
Line 168 
Line 168 
         \code         \code
         List<Person, NullLink>; // Do no synchronization.         List<Person, NullLink>; // Do no synchronization.
         List<Person, Mutex>; // Use Mutex class to synchronize.         List<Person, Mutex>; // Use Mutex class to synchronize.
         List<Person, RecursiveMutex>; // Use RecursiveMutex class to synchronize.          List<Person, Mutex>; // Use Mutex class to synchronize.
         \endcode         \endcode
  
     Finally, use the list. The following example adds three Person objects     Finally, use the list. The following example adds three Person objects
     to the back of the list and removes one from the front.     to the back of the list and removes one from the front.
  
         \code         \code
         typedef List<Person, RecursiveMutex> PersonList;          typedef List<Person, Mutex> PersonList;
         PersonList list;         PersonList list;
  
         list.insert_back(new Person("John"));         list.insert_back(new Person("John"));


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2