Skip to content

Commit 7e85a21

Browse files
committed
fx: Add waitable, stream, and future infrastructure
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1 parent 283f22d commit 7e85a21

5 files changed

Lines changed: 1099 additions & 1655 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ auto call = store.invoke(func, nullptr, [] { return std::vector<std::any>{}; },
211211
store.tick();
212212
```
213213
214+
### Waitables, streams, and futures
215+
216+
The canonical async ABI surfaces are implemented via `canon_waitable_*`, `canon_stream_*`, and `canon_future_*` helpers on `ComponentInstance`. Waitable sets can be joined to readable/writable stream ends or futures, and `canon_waitable_set_poll` reports readiness using the same event payload layout defined by the spec. See the doctests in `test/main.cpp` for end-to-end examples.
217+
214218
Call `tick()` in your host loop until all pending work completes. Cancellation is cooperative: calling `Call::request_cancellation()` marks the associated thread as cancelled before the next `tick()`.
215219
216220

0 commit comments

Comments
 (0)