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
This commit is contained in:
30
docs/api/threading/thread/getcurrentid.md
Normal file
30
docs/api/threading/thread/getcurrentid.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Thread::GetCurrentId
|
||||
|
||||
```cpp
|
||||
static Id GetCurrentId()
|
||||
```
|
||||
|
||||
获取当前执行线程的唯一标识符。这是一个静态方法,可以在任何线程上下文中调用。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** `Thread::Id` - 当前执行线程的唯一标识符
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
Thread worker;
|
||||
worker.Start([]() {
|
||||
printf("Worker thread id: %llu\n", (unsigned long long)Thread::GetCurrentId());
|
||||
}, "WorkerThread");
|
||||
|
||||
printf("Main thread id: %llu\n", (unsigned long long)Thread::GetCurrentId());
|
||||
worker.Join();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Thread 总览](thread.md) - 返回类总览
|
||||
- [GetId](getid.md) - 获取 Thread 对象的 ID
|
||||
Reference in New Issue
Block a user