diff options
author | Jose <jose@zeroc.com> | 2009-10-02 02:23:52 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-10-02 02:23:52 +0200 |
commit | 1d9f29e281770ecdad4a245271f2b828bd64a32f (patch) | |
tree | ac083f28b06a444e484c24f8fcf1b12a36202c84 /cpp/include/Ice/Application.h | |
parent | Updated demo README (diff) | |
download | ice-1d9f29e281770ecdad4a245271f2b828bd64a32f.tar.bz2 ice-1d9f29e281770ecdad4a245271f2b828bd64a32f.tar.xz ice-1d9f29e281770ecdad4a245271f2b828bd64a32f.zip |
3772. Recovering from Glacier2 / Ice router session failure.
Diffstat (limited to 'cpp/include/Ice/Application.h')
-rw-r--r-- | cpp/include/Ice/Application.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/cpp/include/Ice/Application.h b/cpp/include/Ice/Application.h index 1ffc86572e4..f8ac4ebae9b 100644 --- a/cpp/include/Ice/Application.h +++ b/cpp/include/Ice/Application.h @@ -12,10 +12,40 @@ #include <Ice/Ice.h> +#include <IceUtil/Mutex.h> + + namespace Ice { + enum SignalPolicy { HandleSignals, NoSignalHandling } ; + class Application; +} -enum SignalPolicy { HandleSignals, NoSignalHandling } ; +namespace IceInternal +{ + extern ICE_API IceUtil::Mutex* mutex; + extern ICE_API std::auto_ptr<IceUtil::Cond> _condVar; + + // + // Variables than can change while run() and communicator->destroy() are running! + // + extern ICE_API bool _callbackInProgress; + extern ICE_API bool _destroyed; + extern ICE_API bool _interrupted; + + // + // Variables that are immutable during run() and until communicator->destroy() has returned; + // before and after run(), and once communicator->destroy() has returned, we assume that + // only the main thread and CtrlCHandler threads are running. + // + extern ICE_API std::string _appName; + extern ICE_API Ice::CommunicatorPtr _communicator; + extern ICE_API Ice::SignalPolicy _signalPolicy; + extern ICE_API Ice::Application* _application; +} + +namespace Ice +{ class ICE_API Application : private IceUtil::noncopyable { @@ -96,9 +126,9 @@ public: // static bool interrupted(); -private: +protected: - int mainInternal(int, char*[], const Ice::InitializationData&); + virtual int doMain(int, char*[], const Ice::InitializationData&); #if defined(__SUNPRO_CC) // |