Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomParsing/ParsedDicomCache.cpp @ 4458:e4dae17035b9
fix ParsedDicomCache for emscripten
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 Jan 2021 12:43:44 +0100 |
parents | 789676a8c96a |
children | fa2311f94d9f |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.cpp Tue Jan 19 19:05:04 2021 +0100 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.cpp Wed Jan 20 12:43:44 2021 +0100 @@ -71,7 +71,9 @@ size_t ParsedDicomCache::GetNumberOfItems() { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (cache_.get() == NULL) { @@ -88,7 +90,9 @@ size_t ParsedDicomCache::GetCurrentSize() { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (cache_.get() == NULL) { @@ -105,7 +109,9 @@ void ParsedDicomCache::Invalidate(const std::string& id) { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (cache_.get() != NULL) { @@ -124,7 +130,9 @@ ParsedDicomFile* dicom, // Takes ownership size_t fileSize) { +#if !defined(__EMSCRIPTEN__) boost::mutex::scoped_lock lock(mutex_); +#endif if (fileSize >= cacheSize_) { @@ -151,7 +159,9 @@ ParsedDicomCache::Accessor::Accessor(ParsedDicomCache& that, const std::string& id) : +#if !defined(__EMSCRIPTEN__) lock_(that.mutex_), +#endif id_(id), file_(NULL), fileSize_(0)