-
- Downloads
introduce simple CallbackHandle
A CallbackHandle is used to cancel a previosuly submitted future with set callback without keeping the future object around. A CallbackHandle remembers the callback pointer and the IoContext where the callback was submitted to submit a cancel operation for the pointer on the same IoContext. A CallbackHandle can be obtained by calling Future::submitAndGetCallbackHandle().
Showing
- emper/io/CallbackHandle.cpp 30 additions, 0 deletionsemper/io/CallbackHandle.cpp
- emper/io/CallbackHandle.hpp 21 additions, 0 deletionsemper/io/CallbackHandle.hpp
- emper/io/Future.cpp 10 additions, 4 deletionsemper/io/Future.cpp
- emper/io/Future.hpp 26 additions, 12 deletionsemper/io/Future.hpp
- emper/io/IoContext.hpp 8 additions, 1 deletionemper/io/IoContext.hpp
- emper/io/meson.build 1 addition, 0 deletionsemper/io/meson.build
- tests/io/CancelFutureTest.cpp 20 additions, 0 deletionstests/io/CancelFutureTest.cpp
Loading
Please register or sign in to comment