XThreadSetTimeSensitive
Sets or clears a thread as time-sensitive.Syntax
Parameters
isTimeSensitiveThread _In_Type: bool Set to
true to set the calling thread as time-sensitive; otherwise, false.
Return value
Type: HRESULT ReturnsS_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.
Remarks
This function sets or clears the calling thread as a time-sensitive thread, on which blocking or long-running operations should not be performed. This function sets or clears a bit in thread local storage that can be queried by Gaming Runtime Services (GRTS) APIs. Only GRTS APIs that are time-sensitive–safe can be called on a time-sensitive thread. For more information, see Time-sensitive threads. Use the XThreadAssertNotTimeSensitive function at the beginning of methods that aren’t time-sensitive, to break into the debugger if the method is called on a thread that’s time-sensitive. Use the XThreadIsTimeSensitive function to test at runtime, as needed, whether the calling thread is time-sensitive.Requirements
Header: XThread.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
See also
XThreadTime sensitive threads
