MCPcopy Create free account
hub / github.com/boostorg/cobalt / cpu_intense_work

Function cpu_intense_work

example/thread.cpp:23–23  ·  view source on GitHub ↗

this is a function doing some CPU heavy work that should be offloaded onto a thread

Source from the content-addressed store, hash-verified

21
22// this is a function doing some CPU heavy work that should be offloaded onto a thread
23cobalt::promise<int> cpu_intense_work(int a, int b) {co_return a + b;}
24
25// this channel is used to send a response to completed work
26using response_channel = cchannel<void(std::exception_ptr, int)>;

Callers 1

workerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected