katze719.threadschedule
importThread management and scheduling for C++
import threadschedule;
模块名读自上游 modules/threadschedule.cppm 里的 `export module` 声明。
mcpp add katze719.threadschedule@4.1.0
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
#if defined(__linux__)
import std;
import threadschedule;
#endif
int main()
{
#if defined(__linux__)
threadschedule::thread_pool pool(threadschedule::worker_count{1});
auto task = pool.submit([value = std::make_unique<int>(42)] { return *value; });
return task && task->get() == 42 ? 0 : 1;
#else
return 0;
#endif
}
tests/examples/threadschedule-module/tests/smoke.cpp · 项目 tests/examples/threadschedule-module
构建 · 上游清单
- modules
threadschedule- targets
threadschedule (lib), basic_example (bin), getting_started_example (bin), registry_example (bin), registry_merge_example (bin), external_registry_example (bin), registry_chainable_example (bin), scheduled_tasks_example (bin), error_handling_example (bin), thread_configuration_example (bin), short_lived_thread_example (bin), this_thread_example (bin), jthread_example (bin), thread_by_name_view_example (bin), module_example (bin), thread_benchmarks (bin), thread_allocation_benchmarks (bin)- language
c++23- manifest version
4.1.0- 来源
https://raw.githubusercontent.com/Katze719/ThreadSchedule/v4.1.0/mcpp.toml
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
4.1.0 最新 |
LinuxWindowsmacOS | 源站 | f35790f50ea1… |