comparison Core/MultiThreading/Semaphore.cpp @ 2063:ed383e7a6753

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Jul 2016 15:50:11 +0200
parents b1291df2f780
children a3a65de1840f
comparison
equal deleted inserted replaced
2062:40ffd0e8676a 2063:ed383e7a6753
38 38
39 namespace Orthanc 39 namespace Orthanc
40 { 40 {
41 Semaphore::Semaphore(unsigned int count) : count_(count) 41 Semaphore::Semaphore(unsigned int count) : count_(count)
42 { 42 {
43 if (count == 0)
44 {
45 throw OrthancException(ErrorCode_ParameterOutOfRange);
46 }
47 } 43 }
48 44
49 void Semaphore::Release() 45 void Semaphore::Release()
50 { 46 {
51 boost::mutex::scoped_lock lock(mutex_); 47 boost::mutex::scoped_lock lock(mutex_);