Mercurial > hg > orthanc
annotate Core/MultiThreading/ThreadedCommandProcessor.cpp @ 466:9da3596069b8
handling failed commands
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Jul 2013 12:11:45 +0200 |
parents | d665b8fc8560 |
children | 322c1b497036 |
rev | line source |
---|---|
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Belgium |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * This program is free software: you can redistribute it and/or |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * modify it under the terms of the GNU General Public License as |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * published by the Free Software Foundation, either version 3 of the |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * License, or (at your option) any later version. |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * In addition, as a special exception, the copyright holders of this |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * program give permission to link the code of its release with the |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * that use the same license as the "OpenSSL" library), and distribute |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * the linked executables. You must obey the GNU General Public License |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * in all respects for all of the code used other than "OpenSSL". If you |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * modify file(s) with this exception, you may extend this exception to |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * your version of the file(s), but you are not obligated to do so. If |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * you do not wish to do so, delete this exception statement from your |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 * version. If you delete this exception statement from all source files |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 * in the program, then also delete it here. |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 * |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 * This program is distributed in the hope that it will be useful, but |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 * WITHOUT ANY WARRANTY; without even the implied warranty of |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 * General Public License for more details. |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 * |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 * You should have received a copy of the GNU General Public License |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 **/ |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 #include "ThreadedCommandProcessor.h" |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 #include "../OrthancException.h" |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 namespace Orthanc |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 static const int32_t TIMEOUT = 10; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 void ThreadedCommandProcessor::Processor(ThreadedCommandProcessor* that) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 while (!that->done_) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 std::auto_ptr<IDynamicObject> command(that->queue_.Dequeue(TIMEOUT)); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 if (command.get() != NULL) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 { |
466
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
50 bool success = false; |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
51 |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 try |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 { |
466
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
54 if (that->success_) |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
55 { |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
56 // No command has failed so far |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
57 success = dynamic_cast<ICommand&>(*command).Execute(); |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
58 } |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
59 else |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
60 { |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
61 // A command has already failed. Skip the execution of this command. |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
62 } |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 catch (OrthancException) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 boost::mutex::scoped_lock lock(that->mutex_); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 assert(that->remainingCommands_ > 0); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 that->remainingCommands_--; |
466
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
72 |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
73 if (!success) |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
74 that->success_ = false; |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
75 |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 that->processedCommand_.notify_all(); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 ThreadedCommandProcessor::ThreadedCommandProcessor(unsigned int numThreads) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 if (numThreads < 1) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 throw OrthancException(ErrorCode_ParameterOutOfRange); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 } |
466
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
89 |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
90 success_ = true; |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 done_ = false; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 threads_.resize(numThreads); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 remainingCommands_ = 0; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 for (unsigned int i = 0; i < numThreads; i++) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 threads_[i] = new boost::thread(Processor, this); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 ThreadedCommandProcessor::~ThreadedCommandProcessor() |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 done_ = true; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 for (unsigned int i = 0; i < threads_.size(); i++) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 boost::thread* t = threads_[i]; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 if (t != NULL) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 if (t->joinable()) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 t->join(); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 delete t; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 void ThreadedCommandProcessor::Post(ICommand* command) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
124 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 boost::mutex::scoped_lock lock(mutex_); |
461 | 127 queue_.Enqueue(command); |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 remainingCommands_++; |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 |
466
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
133 bool ThreadedCommandProcessor::Join() |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
135 boost::mutex::scoped_lock lock(mutex_); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
136 |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 while (!remainingCommands_ == 0) |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 { |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 processedCommand_.wait(lock); |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 } |
466
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
141 |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
142 // Reset the "success" flag for subsequent commands |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
143 bool hasSucceeded = success_; |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
144 success_ = true; |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
145 |
9da3596069b8
handling failed commands
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
461
diff
changeset
|
146 return hasSucceeded; |
458
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 } |
84966299c8f8
ThreadedCommandProcessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 } |