MCPcopy Create free account
hub / github.com/apple/foundationdb / sendError

Method sendError

flow/include/flow/IThreadPool.h:134–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 }
133
134 void sendError(Error const& e) { // Can be called safely from another thread.
135 Promise<Void> signal;
136 tagAndForwardError(&promiseStream, e, signal.getFuture());
137 g_network->onMainThread(std::move(signal),
138 g_network->isOnMainThread() ? incrementPriorityIfEven(g_network->getCurrentTask())
139 : TaskPriority::DefaultOnMainThread);
140 }
141
142private:
143 PromiseStream<T> promiseStream;

Callers

nothing calls this directly

Calls 7

tagAndForwardErrorFunction · 0.85
moveFunction · 0.85
incrementPriorityIfEvenFunction · 0.85
getFutureMethod · 0.45
onMainThreadMethod · 0.45
isOnMainThreadMethod · 0.45
getCurrentTaskMethod · 0.45

Tested by

no test coverage detected