Partager via


XThreadIsTimeSensitive

Indicates whether the calling thread is marked as time-sensitive.

Syntax

bool XThreadIsTimeSensitive(  
)  

Parameters

None.

Return value

Type: bool

Returns true if the calling thread is marked as time-sensitive; otherwise, false.

Remarks

This function indicates if the calling thread is set as a time-sensitive thread, on which blocking or long-running operations should not be performed. Only Gaming Runtime Services (GRTS) APIs that are time-sensitive–safe can be called on a time-sensitive thread. For more information, see Time-sensitive threads.

Use the XThreadSetTimeSensitive function to set or clear a thread as time-sensitive. This function sets or clears a bit in thread local storage that can be queried by Gaming Runtime Services (GRTS) APIs.

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.

Requirements

Header: XThread.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XThread
Time-sensitive threads