Skip to content

Refactor py:cast to fire-and-forget, add py:spawn_call#26

Merged
benoitc merged 2 commits intomainfrom
refactor/cast-spawn-call
Mar 13, 2026
Merged

Refactor py:cast to fire-and-forget, add py:spawn_call#26
benoitc merged 2 commits intomainfrom
refactor/cast-spawn-call

Conversation

@benoitc
Copy link
Owner

@benoitc benoitc commented Mar 13, 2026

Summary

  • py:cast/3,4,5 now returns ok immediately (fire-and-forget)
  • New py:spawn_call/3,4,5 returns ref for use with py:await
  • Both support explicit context as first argument

Changes

  • py:cast - true fire-and-forget like gen_server:cast
  • py:spawn_call - async call with ref for await (previous cast behavior)
  • Context-aware variants: cast/4,5 and spawn_call/4,5
  • Updated tests, examples, and docs

benoitc added 2 commits March 13, 2026 03:37
Track elapsed time in microseconds to avoid integer division
truncation (100/1000=0) that broke timeouts >1ms.
- py:cast now returns ok immediately (no await)
- py:spawn_call returns ref for use with py:await
- Both support explicit context: cast/4,5 and spawn_call/4,5
- Update docs and examples
@benoitc benoitc merged commit 7576e5b into main Mar 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant