Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ libhal_project_init()
libhal_add_library(async_context
MODULES
modules/async_context.cppm
modules/coroutine.cppm
modules/schedulers.cppm)
libhal_apply_compile_options(async_context)
libhal_install_library(async_context NAMESPACE libhal)
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ performance.
#include <thread>

import async_context;
import async_context.schedulers;

using namespace std::chrono_literals;

Expand Down Expand Up @@ -108,7 +107,10 @@ int main()

// Drive all three contexts to completion.
// run_until_done sleeps until the nearest time deadline when all contexts
// are blocked, and wakes immediately when any context becomes ready.
// are blocked.
//
// NOTE: A proper wake function should wake immediately when any context
// becomes ready, where as this one sleeps until it is awoken.
async::chrono_clock_adapter<std::chrono::steady_clock> clk;
async::run_until_done(
clk,
Expand Down Expand Up @@ -244,7 +246,7 @@ The base context class that manages coroutine execution and memory. Contexts
are initialized with stack memory via their constructor:

```cpp
std::array<async::uptr, 1024> my_stack{};
std::array<async::stack_word, 1024> my_stack{};
async::context ctx(my_stack);
```

Expand Down
Loading
Loading