XAsyncRun
Asynchronously runs the specified callback function.Syntax
Parameters
asyncBlock _Inout_Type: XAsyncBlock* A pointer to the XAsyncBlock that is used to track the asynchronous call. work _In_
Type: XAsyncWork* A pointer to a callback function to run asynchronously.
Return value
Type: HRESULT ReturnsS_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.
Remarks
XAsyncRun is a helper function that asynchronously runs the callback function specified in work. You can use the XAsyncBlock specified in asyncBlock to cancel or get the status of the callback function. XAsyncRun internally uses the following XAsyncProvider functions to run and track the callback function:
For more information about implementing your own asynchronous functionality with XAsyncProvider and XAsyncBlock, see Asynchronous Programming Model.
Requirements
Header: XAsync.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
- Run Microsoft Game Development Kit (GDK) API task
- Run simple task
- XAsync library overview
- Set up cancelability
- Set up custom provider
- Asynchronous Programming Model
- Generic async task wrapper
See also
XAsync MembersXAsyncProvider Members
Asynchronous Programming Model
