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

Method send

flow/include/flow/IThreadPool.h:96–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95 template <class U>
96 void send(U&& t) { // Can be called safely from another thread. Call send or sendError at most once.
97 Promise<Void> signal;
98 tagAndForward(&promise, t, signal.getFuture());
99 g_network->onMainThread(std::move(signal),
100 g_network->isOnMainThread() ? incrementPriorityIfEven(g_network->getCurrentTask())
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());

Callers

nothing calls this directly

Calls 7

tagAndForwardFunction · 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