Console Library
8.0.0
A header-only library that makes C++ simple
Toggle main menu visibility
Loading...
Searching...
No Matches
async.h
Go to the documentation of this file.
1
8
9
/*
10
Copyright (c) 2026 MrXie1109
11
12
Permission is hereby granted, free of charge, to any person obtaining a copy
13
of this software and associated documentation files (the "Software"), to deal
14
in the Software without restriction, including without limitation the rights
15
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
copies of the Software, and to permit persons to whom the Software is
17
furnished to do so, subject to the following conditions:
18
19
The above copyright notice and this permission notice shall be included in all
20
copies or substantial portions of the Software.
21
22
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
SOFTWARE.
29
*/
30
31
#pragma once
32
#include "
./async/channel.h
"
33
#include "
./async/event.h
"
34
#include "
./async/group.h
"
35
#include "
./async/pool.h
"
36
#include "
./async/queue.h
"
37
#include "
./async/sched.h
"
38
#include "
./async/task.h
"
39
#include "
./async/thread.h
"
40
41
namespace
console
{}
channel.h
基于环形缓冲区的有锁线程安全通信通道。
event.h
提供线程同步的 Event 类,支持设置、清除、等待和超时等待等操作。
group.h
异步任务组,用于管理一组异步任务的执行,提供添加任务、等待完成及回调通知功能。
console
本库所有组件所在的顶层命名空间。
pool.h
简单的线程池实现,模仿了 Python 的 concurrent.futures.ThreadPoolExecutor 接口。
queue.h
基于自旋的高性能 FIFO 队列,支持多生产者/多消费者并发场景。
sched.h
基于条件变量的简单调度器,用于延迟执行或周期性的后台任务。
task.h
异步任务框架,提供 Task 和 SharedTask 两类异步任务工具。
thread.h
线程封装类,提供线程的启动、停止和等待功能。
include
async.h
Generated on
for Console Library by
1.18.0