diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-07-23 15:06:02 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-07-23 15:06:02 -0230 |
commit | 866f9ff17391176b836f9bb49f6da40c2c938441 (patch) | |
tree | 7366963294ef3356c7b887cd89af753988c21beb /cpp/src/Freeze/BackgroundSaveEvictorI.h | |
parent | adding ACM tests for Python/Ruby/PHP (diff) | |
download | ice-866f9ff17391176b836f9bb49f6da40c2c938441.tar.bz2 ice-866f9ff17391176b836f9bb49f6da40c2c938441.tar.xz ice-866f9ff17391176b836f9bb49f6da40c2c938441.zip |
ICE-4234 - Update Ice to use current Java threading constructs
- Use ScheduledThreadPoolDispatcher not IceUtilInternal.Timer.
- Use Ice timer in glacier2, Freeze impl.
- Align C++, C# with java changes.
- Database demo now supports mariadb.
Diffstat (limited to 'cpp/src/Freeze/BackgroundSaveEvictorI.h')
-rw-r--r-- | cpp/src/Freeze/BackgroundSaveEvictorI.h | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/cpp/src/Freeze/BackgroundSaveEvictorI.h b/cpp/src/Freeze/BackgroundSaveEvictorI.h index a5afff853ff..12037c53275 100644 --- a/cpp/src/Freeze/BackgroundSaveEvictorI.h +++ b/cpp/src/Freeze/BackgroundSaveEvictorI.h @@ -60,34 +60,6 @@ namespace Freeze class BackgroundSaveEvictorI; -// -// The WatchDogThread is used by the saving thread to ensure the -// streaming of some object does not take more than timeout ms. -// We only measure the time necessary to acquire the lock on the -// object (servant), not the streaming itself. -// - -class WatchDogThread : public IceUtil::Thread, private IceUtil::Monitor<IceUtil::Mutex> -{ -public: - - WatchDogThread(long, BackgroundSaveEvictorI&); - - void run(); - - void activate(); - void deactivate(); - void terminate(); - -private: - const IceUtil::Time _timeout; - BackgroundSaveEvictorI& _evictor; - bool _done; - bool _active; -}; - -typedef IceUtil::Handle<WatchDogThread> WatchDogThreadPtr; - struct BackgroundSaveEvictorElement; typedef IceUtil::Handle<BackgroundSaveEvictorElement> BackgroundSaveEvictorElementPtr; @@ -199,7 +171,8 @@ private: std::deque<BackgroundSaveEvictorElementPtr> _modifiedQueue; bool _savingThreadDone; - WatchDogThreadPtr _watchDogThread; + long _streamTimeout; + IceUtil::TimerPtr _timer; // // Threads that have requested a "saveNow" and are waiting for |