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

Method sendError

flow/include/flow/IThreadPool.h:103–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 : TaskPriority::DefaultOnMainThread);
102 }
103 void sendError(Error e) { // Can be called safely from another thread. Call send or sendError at most once.
104 Promise<Void> signal;
105 tagAndForwardError(&promise, e, signal.getFuture());
106 g_network->onMainThread(std::move(signal),
107 g_network->isOnMainThread() ? incrementPriorityIfEven(g_network->getCurrentTask())
108 : TaskPriority::DefaultOnMainThread);
109 }
110 bool isValid() { return promise.isValid(); }
111
112private:

Callers 1

postMethod · 0.45

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