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… |