Skip to content

v1.0.12 — Async fn future wrapping + oneshot channel fixes

Choose a tag to compare

@murphsicles murphsicles released this 10 May 04:39
· 35 commits to main since this release

Async function fixes

  • Async fn returns now wrapped in future_ready() so the .await poll loop gets a valid future struct pointer (fixes segfault when calling async functions)
  • main() is exempted from wrapping — returns the actual i64 result directly
  • .await loop calls async_yield() (sched_yield) instead of busy-spinning

Oneshot channel

  • Rewritten to use shared host_mpsc channel infrastructure (Sender and Receiver share state via channel id)
  • host_mpsc_poll() runtime function added to check data availability without blocking
  • Synchronous try_recv() works correctly; async recv() wraps host_mpsc_try_recv in future_ready()

Channel example

  • channel_example.z returns 48 (42 from oneshot + 6 from mpsc) ✅

Fixed bugs

  • oneshot::channel_inst_i64 no longer has "Incorrect number of arguments" error (0-param monomorphized functions now generate correct LLVM signatures)