| 
    Safir SDK Core
    
   | 
 
Interface for a synchronized object. More...
#include <Safir/Utilities/StartupSynchronizer.h>
Public Member Functions | |
| virtual | ~Synchronized () | 
| virtual void | Create ()=0 | 
| Guarantees are that only one call to Create in all processes will be made.  More... | |
| virtual void | Use ()=0 | 
| All processes will get a call to Use, even the one that got the Create callback.  More... | |
| virtual void | Destroy ()=0 | 
| This callback will be called when the last process destroys its StartupSynchronizer.  More... | |
Interface for a synchronized object.
Note that NONE of these callbacks are exception safe! If you let an exception propagate through the callback anything could happen!
      
  | 
  virtual | 
      
  | 
  pure virtual | 
Guarantees are that only one call to Create in all processes will be made.
Even the process that gets a call to Create will get a call to Use after Create is finished. Use this callback to create the shared resource.
Note that this callback must not assume that a previous instance has been able to call Destroy (see below), but may have to perform cleanup before creating the shared resource.
      
  | 
  pure virtual | 
This callback will be called when the last process destroys its StartupSynchronizer.
Use it to perform any cleanup.
Note that a call to Destroy is not guaranteed, only a best effort is made to call this. The last instance could be killed by a signal anyway, so there is no point in making this a strong guarantee.
      
  | 
  pure virtual | 
All processes will get a call to Use, even the one that got the Create callback.
Use this callback to open the shared resource for use.