Mercurial > hg > orthanc
comparison OrthancFramework/Sources/MultiThreading/Semaphore.cpp @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | bf7b9edf6b81 |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4299:3f85db78c441 | 4300:b30a8de92ad9 |
---|---|
35 { | 35 { |
36 throw OrthancException(ErrorCode_ParameterOutOfRange); | 36 throw OrthancException(ErrorCode_ParameterOutOfRange); |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 unsigned int Semaphore::GetAvailableResourcesCount() const | |
41 { | |
42 return availableResources_; | |
43 } | |
44 | |
40 void Semaphore::Release(unsigned int resourceCount) | 45 void Semaphore::Release(unsigned int resourceCount) |
41 { | 46 { |
42 boost::mutex::scoped_lock lock(mutex_); | 47 boost::mutex::scoped_lock lock(mutex_); |
43 | 48 |
44 availableResources_ += resourceCount; | 49 availableResources_ += resourceCount; |