MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / handleMessage

Method handleMessage

cp-profiler/src/cpprofiler/receiver_worker.cpp:145–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143/// label, nogood and info can be quieried at any time
144
145void ReceiverWorker::handleMessage(const Message &msg)
146{
147
148 if (m_settings.receiver_delay > 0)
149 {
150 utils::sleep_for_ms(m_settings.receiver_delay);
151 }
152
153 switch (msg.type())
154 {
155 case cpprofiler::MsgType::NODE:
156
157 try
158 {
159 MessageWrapper m(msg);
160 emit newNode(m);
161 }
162 catch (std::exception &e)
163 {
164 }
165
166 break;
167 case cpprofiler::MsgType::START:
168 print("message: start");
169 handleStart(msg);
170 break;
171 case cpprofiler::MsgType::DONE:
172 emit doneReceiving();
173 print("message: done");
174 break;
175 case cpprofiler::MsgType::RESTART:
176 print("message: restart");
177 break;
178 default:
179 print("ERROR: unknown solver message");
180 }
181}
182
183} // namespace cpprofiler

Callers

nothing calls this directly

Calls 3

sleep_for_msFunction · 0.85
typeMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected