vxx2 / vlib / x / async / examples / README.md
54 lines · 44 sloc · 2.15 KB · a66aa5b0fe618b32988f4fd9b235017c336940ba
Raw

x.async examples

This folder contains short public examples for the current x.async API. Each file focuses on one idea and uses only local, in-memory work.

Examples are documentation-first programs. They show how the public API is expected to be used in small readable scenarios. They are executed by the validation script to avoid bit rot, but the regression guarantees live in the tests/ folder.

Rules

Examples

Run

From the repository root:

./v run vlib/x/async/examples/basic_group.v
./v run vlib/x/async/examples/basic_task.v
./v run vlib/x/async/examples/worker_pool.v
./v run vlib/x/async/examples/bounded_pool_submit.v
./v run vlib/x/async/examples/periodic.v
./v run vlib/x/async/examples/timeout.v
./v run vlib/x/async/examples/net_http/request_batch.v
./v run vlib/x/async/examples/net_websocket/message_pipeline.v
./v run vlib/x/async/examples/mcp/tool_dispatch.v
./v run vlib/x/async/examples/veb/app_lifecycle.v

Use tools/validate.sh for the guarded module validation path. It isolates V temporary/cache directories and keeps validation runners serialized.