Files
XCSDD/docs/api/threading/thread/getname.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

29 lines
519 B
Markdown

# Thread::GetName
```cpp
const Containers::String& GetName() const
```
获取线程的名称。该名称在调用 Start 时设置。
**参数:**
**返回:** `const Containers::String&` - 线程名称的引用
**复杂度:** O(1)
**注意:** 在调用 Start 之前返回空字符串。
**示例:**
```cpp
Thread worker;
worker.Start([]() {}, "ComputeThread");
printf("Thread name: %s\n", worker.GetName().CStr());
worker.Join();
```
## 相关文档
- [Thread 总览](thread.md) - 返回类总览