> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XThreadAssertNotTimeSensitive

> XThreadAssertNotTimeSensitive

# XThreadAssertNotTimeSensitive

Breaks into the debugger if the calling thread is marked as time sensitive.

## Syntax

```cpp theme={null}
void XThreadAssertNotTimeSensitive(  
)  
```

### Parameters

None.

### Return value

Type: void

None.

## Remarks

This function breaks into the debugger if the calling thread is marked 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](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

If this function is called from a time-sensitive thread and no debugger is attached, then the call does nothing. If a debugger is attached, it will break into the debugger and output a debug string similar to the following example.

```dos theme={null}
***
*** Time Sensitive Thread Violation ***
***
*** This thread is marked as Time Sensitive and is calling an API that is
*** not time-sensitive-safe.
***
*** To disable these breakpoints globally, set byte at
*** enable_time_sensitive_asserts (0x00000000) to 0.
***
```

Use the [XThreadSetTimeSensitive](/reference/system/xthread/functions/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 [XThreadIsTimeSensitive](/reference/system/xthread/functions/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 consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XThread](/reference/system/xthread/xthread_members)\
[Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)


## Related topics

- [XThread](/reference/system/xthread/xthread_members.md)
- [XThreadIsTimeSensitive](/reference/system/xthread/functions/xthreadistimesensitive.md)
- [XThreadSetTimeSensitive](/reference/system/xthread/functions/xthreadsettimesensitive.md)
- [XGameStreamingUninitialize](/reference/system/xgamestreaming/functions/xgamestreaminguninitialize.md)
- [XUserFindUserByLocalId](/reference/system/xuser/functions/xuserfinduserbylocalid.md)
