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

如果呼叫執行緒被標示為時間敏感，則中斷進入偵錯工具。

## 語法

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

### 參數

無。

### 傳回值

類型：void

無。

## 備註

如果呼叫執行緒被標示為*時間敏感執行緒*，此函式會中斷進入偵錯工具；在時間敏感執行緒上不應執行封鎖或長時間執行的作業。只有時間敏感安全的 Gaming Runtime Services (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](/zh-TW/reference/system/xthread/functions/xthreadsettimesensitive) 函式將執行緒設定為時間敏感或清除其時間敏感設定。此函式會設定或清除執行緒區域儲存區中的一個位元，可供 Gaming Runtime Services (GRTS) API 查詢。

視需要使用 [XThreadIsTimeSensitive](/zh-TW/reference/system/xthread/functions/xthreadistimesensitive) 函式在執行階段測試呼叫執行緒是否為時間敏感。

## 需求

**標頭：** XThread.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 概念文件

* [時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 另請參閱

[XThread](/zh-TW/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-TW/reference/system/xthread/xthread_members.md)
- [XThreadIsTimeSensitive](/zh-TW/reference/system/xthread/functions/xthreadistimesensitive.md)
- [XThreadSetTimeSensitive](/zh-TW/reference/system/xthread/functions/xthreadsettimesensitive.md)
- [適用於 GDK 的 Unity C# API 包裝函式](/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [HCHttpDisableAssertsForSSLValidationInDevSandboxes](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpdisableassertsforsslvalidationindevsandboxes.md)
