XAsyncGetStatus
Returns the status of the asynchronous call, optionally waiting for it to complete.Syntax
Parameters
asyncBlock _Inout_Type: XAsyncBlock* A pointer to the XAsyncBlock that was passed to the asynchronous call. wait _In_
Type: bool If true,
XAsyncGetStatus waits until the asynchronous call either completes or is canceled.
Return value
Type: HRESULT ReturnsS_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.
Remarks
Once the asynchronous call is complete, you can then call XAsyncGetResult to get the results if the asynchronous call has a resulting data payload. If the asynchronous call doesn’t have a resulting data payload, you don’t have to call XAsyncGetResult. Note: Both a completion callback andXAsyncGetStatus with a wait parameter of true can be used to identify when a call has finished. The ordering of these calls can be ambiguous and as a best practice you should not use both for the same call.
Requirements
Header: XAsync.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
- Run simple task
- XAsync library overview
- Set up custom provider
- Asynchronous Programming Model
- Asynchronous programming design goals and improvements
See also
XAsync MembersXAsyncGetResult
Asynchronous Programming Model
