Enhance documentations.

Signed-off-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
Tao He 2021-04-02 17:04:35 +08:00
parent 6115815693
commit ef82d4aa84
1 changed files with 3 additions and 0 deletions

View File

@ -531,6 +531,9 @@ It will perform a periodly keep-alive action before it is cancelled explicitly,
could accept a handler of type `std::function<std::exception_ptr>` and the handler will be invoked could accept a handler of type `std::function<std::exception_ptr>` and the handler will be invoked
when exception occurs during keeping it alive. when exception occurs during keeping it alive.
Note that the handler will invoked in a separated thread, not the thread where the `KeepAlive` object
is constructed.
```c++ ```c++
std::function<void (std::exception_ptr)> handler = [](std::exception_ptr eptr) { std::function<void (std::exception_ptr)> handler = [](std::exception_ptr eptr) {
try { try {