| 44 | } |
| 45 | |
| 46 | void anIntAPI(int a, int b, void* context, void (*completed)(void* context, int result)) |
| 47 | { |
| 48 | // Execute some work asynchronously on some other thread. When its |
| 49 | // work is finished, pass the result to the callback. |
| 50 | scope_.spawn(ex::starts_on(pool_.get_scheduler(), |
| 51 | ex::then(ex::just(), |
| 52 | [=]() noexcept |
| 53 | { |
| 54 | auto result = a + b; |
| 55 | completed(context, result); |
| 56 | }))); |
| 57 | } |
| 58 | |
| 59 | void aVoidAPI(void* context, void (*completed)(void* context)) |
| 60 | { |
nothing calls this directly
no test coverage detected