diff options
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r-- | cpp/src/IcePatch2/Util.cpp | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index fb2308c6cec..1614b1e8fbc 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -870,89 +870,3 @@ IcePatch2::operator>>(istream& is, FileInfo& info) return is; } - -IcePatch2::Decompressor::Decompressor() : - _destroy(false) -{ -} - -IcePatch2::Decompressor::~Decompressor() -{ - assert(_destroy); -} - -void -IcePatch2::Decompressor::destroy() -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - _destroy = true; - - notify(); -} -void -IcePatch2::Decompressor::add(const string& file) -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - assert(!_destroy); - - if(_files.empty()) - { - notify(); - } - - _files.push_back(file); -} - -void -IcePatch2::Decompressor::checkForException() const -{ - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - if(!_exception.empty()) - { - assert(_destroy); - throw _exception; - } -} - -void -IcePatch2::Decompressor::run() -{ - while(true) - { - std::string file; - - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - while(!_destroy && _files.empty()) - { - wait(); - } - - if(_destroy && _files.empty()) - { - return; - } - - assert(!_files.empty()); - file = _files.front(); - _files.pop_front(); - } - - try - { - decompressFile(file); - remove(file + ".bz2"); - } - catch(const string& ex) - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - _destroy = true; - _exception = ex; - return; - } - } -} |