◆ notifier()
template<typename Result , typename... Args>
◆ operator co_await()
template<typename Result , typename... Args>
| awaiter_type v1::notifier< Result(Args...)>::operator co_await |
( |
| ) |
const |
|
inlinenoexcept |
Create an awaiter that can await on this notifier.
◆ operator()()
template<typename Result , typename... Args>
| void v1::notifier< Result(Args...)>::operator() |
( |
Args const &... | args | ) |
const |
|
inlinenoexcept |
Call the subscribed callbacks with the given arguments.
- Note
- This function is not reentrant.
- Parameters
-
| args | The arguments to pass with the invocation of the callback |
◆ subscribe()
template<typename Result , typename... Args>
Add a callback to the notifier.
Ownership of the callback belongs with the caller of subscribe(). The caller will receive a token, a move-only RAII object that will unsubscribe the callback when the token is destroyed.
- Parameters
-
| flags | The callback-flags used to determine how the callback is called. |
| callback | A function object to call when being notified. |
- Returns
- A RAII object which when destroyed will unsubscribe the callback.
The documentation for this class was generated from the following file: