You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
truapi-server: replace std::thread::spawn per subscription with a proper executor #97
Found during review of #96. rust/crates/truapi-server/src/subscription.rs spawns one OS thread per active subscription via std::thread::spawn(move || futures::executor::block_on(future)). Subscriptions are long-lived (chain follow, statement-store subscribe, account connection status) so this leaks one thread per stream on native and panics on wasm32 (which has no threads, the file currently has no cfg gate). Fix: drive subscriptions via the dispatcher's own executor — tokio LocalSet on the ws-bridge, wasm-bindgen-futures spawn on wasm, an injected executor handle on UniFFI hosts.
Activity
fix(truapi-server): inject Spawner instead of std::thread::spawn per …
chore: Makefile, CI, and design docs for the new core (Phase 7, #103)
pgherveou commentedon Jun 29, 2026
Closing this generated tracking issue as covered by PR #104 and its review follow-ups.