AI AGENT ADDONS

Async Io Model

tursodatabase/turso
Databases
903installs

TursoDB uses a special way to handle input and output tasks. Instead of using Rust's built-in async system, it uses cooperative yielding with explicit state machines. This means a function can pause itself and wait for an IO operation to finish before continuing.

The core type IOResult tells you if an operation is done or needs IO. Functions return this and must be called again until they're done. Completion and CompletionGroup track single or multiple IO operations. You can wait for several at once.

A big pitfall is re-entrancy. If you change shared state before a yield point, the function may run again and change it twice. The fix is to mutate state only after the IO is complete or use a state machine to track progress. This guide helps you write safe and correct async code in TursoDB's core.

Add Async Io Model skill to your workflow

Global

mkdir -p ~/.claude/skills/async-io-model

Project

mkdir -p .claude/skills/async-io-model

Source Repository

Stars
22,394
Forks
1,125
Watchers
22,394
License
MIT
Last Push
1 month ago
Created
3 years ago