Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Core/MultiThreading/ThreadedCommandProcessor.cpp Fri Feb 14 16:12:44 2014 +0100 +++ b/Core/MultiThreading/ThreadedCommandProcessor.cpp Tue Feb 18 16:18:42 2014 +0100 @@ -158,6 +158,11 @@ void ThreadedCommandProcessor::Post(ICommand* command) { + if (command == NULL) + { + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + boost::mutex::scoped_lock lock(mutex_); queue_.Enqueue(command); remainingCommands_++;