MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / cancel

Method cancel

Source/Common/Async.cpp:173–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void Async::cancel() {
174 for (auto event = _workerEvent.poll();
175 event != nullptr;
176 event = _workerEvent.poll()) {
177 switch (Switch::hash(event->getName())) {
178 case "Work"_hash: {
179 Own<std::function<void()>> worker;
180 break;
181 }
182 case "WorkDone"_hash: {
183 Own<WorkDone> workDone;
184 event->get(workDone);
185 break;
186 }
187 }
188 }
189}
190
191void Async::bindPool(AsyncThread* pool, size_t index) {
192 _pool = pool;

Callers

nothing calls this directly

Calls 7

hashFunction · 0.70
getNameMethod · 0.65
getMethod · 0.65
storeMethod · 0.65
cancelMethod · 0.65
stopMethod · 0.65
pollMethod · 0.45

Tested by

no test coverage detected