this is a function doing some CPU heavy work that should be offloaded onto a thread
| 21 | |
| 22 | // this is a function doing some CPU heavy work that should be offloaded onto a thread |
| 23 | cobalt::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 |
| 26 | using response_channel = cchannel<void(std::exception_ptr, int)>; |