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

# XThreadSetTimeSensitive

> XThreadSetTimeSensitive

# XThreadSetTimeSensitive

스레드를 시간에 민감한 상태로 설정하거나 지웁니다.

## 구문

```cpp theme={null}
HRESULT XThreadSetTimeSensitive(  
         bool isTimeSensitiveThread  
)  
```

### 매개 변수

*isTimeSensitiveThread*   \_In\_\
형식: bool

호출 스레드를 시간에 민감한 상태로 설정하려면 `true`로 설정하고, 그렇지 않으면 `false`로 설정합니다.

### 반환 값

형식: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

성공하면 `S_OK`를 반환하고, 그렇지 않으면 오류 코드를 반환합니다. 오류 코드 목록은 [오류 코드](/reference/errorcodes)를 참조하세요.

## 설명

이 함수는 호출 스레드를 *시간에 민감한 스레드*로 설정하거나 지웁니다. 이런 스레드에서는 차단 작업이나 오래 실행되는 작업을 수행해서는 안 됩니다. 이 함수는 GRTS(Gaming Runtime Services) API로 쿼리할 수 있는 스레드 로컬 저장소의 비트를 설정하거나 지웁니다. 시간에 민감한 스레드에서는 시간에 민감해도 안전한 GRTS API만 호출할 수 있습니다. 자세한 내용은 [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하세요.

시간에 민감하지 않은 메서드의 시작 부분에 [XThreadAssertNotTimeSensitive](/reference/system/xthread/functions/xthreadassertnottimesensitive) 함수를 사용하면, 시간에 민감한 스레드에서 해당 메서드가 호출되는 경우 디버거로 중단할 수 있습니다.

필요에 따라 런타임에 호출 스레드가 시간에 민감한지 테스트하려면 [XThreadIsTimeSensitive](/reference/system/xthread/functions/xthreadistimesensitive) 함수를 사용합니다.

## 요구 사항

**헤더:** XThread.h

**라이브러리:** xgameruntime.lib

**지원 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [비동기 프로그래밍 디자인 목표 및 개선 사항](/build/core-features/common/async/async-whitepaper)
* [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 함께 보기

[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](/ko/reference/system/xthread/xthread_members.md)
- [XThreadIsTimeSensitive](/ko/reference/system/xthread/functions/xthreadistimesensitive.md)
- [XThreadAssertNotTimeSensitive](/ko/reference/system/xthread/functions/xthreadassertnottimesensitive.md)
- [XClosedCaptionSetEnabled](/ko/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md)
- [XSpeechToTextSetPositionHint](/ko/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint.md)
