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:
39
docs/api/core/event/ProcessUnsubscribes.md
Normal file
39
docs/api/core/event/ProcessUnsubscribes.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Event::ProcessUnsubscribes
|
||||
|
||||
```cpp
|
||||
void ProcessUnsubscribes();
|
||||
```
|
||||
|
||||
处理积压的退订请求。
|
||||
|
||||
**描述**
|
||||
|
||||
手动处理待退订的回调,将其从订阅列表中移除。通常不需要手动调用,`Invoke` 会自动处理退订。但在某些场景下可能需要主动调用。
|
||||
|
||||
**复杂度:** O(n) 其中 n 为待退订数量
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Core/Event.h>
|
||||
|
||||
using namespace XCEngine::Core;
|
||||
|
||||
Event<int> event;
|
||||
|
||||
// 订阅
|
||||
uint64_t id = event.Subscribe([](int value) { });
|
||||
|
||||
// 退订请求入队
|
||||
event.Unsubscribe(id);
|
||||
|
||||
// 主动处理退订
|
||||
event.ProcessUnsubscribes();
|
||||
|
||||
// 此时事件列表中已无该回调
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Event 总览](event.md) - 返回类总览
|
||||
- [Unsubscribe](Unsubscribe.md) - 退订事件
|
||||
Reference in New Issue
Block a user