comparison Core/MultiThreading/ThreadedCommandProcessor.cpp @ 723:0da078f3affc

multithreading tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 18 Feb 2014 16:18:42 +0100
parents 2d0a347e8cfc
children a811bdf8b8eb
comparison
equal deleted inserted replaced
722:3596177682a9 723:0da078f3affc
156 } 156 }
157 157
158 158
159 void ThreadedCommandProcessor::Post(ICommand* command) 159 void ThreadedCommandProcessor::Post(ICommand* command)
160 { 160 {
161 if (command == NULL)
162 {
163 throw OrthancException(ErrorCode_ParameterOutOfRange);
164 }
165
161 boost::mutex::scoped_lock lock(mutex_); 166 boost::mutex::scoped_lock lock(mutex_);
162 queue_.Enqueue(command); 167 queue_.Enqueue(command);
163 remainingCommands_++; 168 remainingCommands_++;
164 totalCommands_++; 169 totalCommands_++;
165 } 170 }