> ## 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

如果调用线程被标记为时间敏感，则中断到调试器。

## Syntax

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

### Parameters

无。

### Return value

类型：void

无。

## Remarks

如果调用线程被标记为*时间敏感线程*（不应在其上执行阻塞或长时间运行的操作），则此函数将中断到调试器。只有时间敏感–安全的游戏运行时服务 (GRTS) API 才能在时间敏感线程上调用。有关详细信息，请参阅[时间敏感线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。

如果从时间敏感线程调用此函数，并且未附加调试器，则该调用不执行任何操作。如果附加了调试器，则会中断到调试器并输出类似于以下示例的调试字符串。

```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.
***
```

使用 [XThreadSetTimeSensitive](/reference/system/xthread/functions/xthreadsettimesensitive) 函数将线程设置为或清除为时间敏感。此函数在线程本地存储中设置或清除一个位，游戏运行时服务 (GRTS) API 可以查询该位。

根据需要，使用 [XThreadIsTimeSensitive](/reference/system/xthread/functions/xthreadistimesensitive) 函数在运行时测试调用线程是否为时间敏感线程。

## Requirements

**头文件：** XThread.h

**库：** xgameruntime.lib

**受支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## Conceptual documentation

* [时间敏感线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XThread](/reference/system/xthread/xthread_members)\
[时间敏感线程](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)


## Related topics

- [XThread](/zh-CN/reference/system/xthread/xthread_members.md)
- [XThreadIsTimeSensitive](/zh-CN/reference/system/xthread/functions/xthreadistimesensitive.md)
- [XThreadSetTimeSensitive](/zh-CN/reference/system/xthread/functions/xthreadsettimesensitive.md)
- [XSpeechToTextSendString](/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsendstring.md)
- [XSpeechToTextSetPositionHint](/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint.md)
