class complete_event
Declaration
class complete_event : public async_event_impl { /* full declaration omitted */ };
Description
async_event
implementation that is immediately complete. Used to report synchronous completion of some operations within an otherwise asynchronous context.
Inherits from: async_event_impl
Member Variables
- void* m_result = nullptr
Member Function Overview
- complete_event()
- complete_event(void * result) → explicit
- get_result() → void *
- is_complete() → bool
Inherited from async_event_impl:
Member Functions
¶complete_event()
complete_event()
¶explicit complete_event(void* result)
explicit complete_event(void* result)
Parameters
- void* result
¶void* get_result()
void* get_result()
Description
There is only one instruction type which returns a result, namely alloc_instruction returning a pointer to the allocated memory, i.e. a void*. Having a void* return type on async_event_impl is somewhat leaky, but we don't gain much by wrapping it in a std::any.
¶bool is_complete()
bool is_complete()
Description
If this function returns true once, the implementation must guarantee that it will always do so in the future. The event is expected to be cheap to poll repeatedly, and the operation must proceed in the background even while not being polled.