0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Corentin Kerisit
00ebef1a32
async/coro: make coroutines unwindable (#273)
The first stack of each new coroutines were holding not zeroed and hold
random memory data, which get popped in rbp during first coroutine stack
swap.

Which made unwinding random or even SIGSEGV when _Unwind_Backtrace was
used (during C++ exception for instance).

Zeroing the first part of the stack makes unwinding stop gracefully when
it encounters $rbp=0x00.
2025-07-12 20:48:37 +02:00
Steeve Morin
5309a25420
async: vendor zigcoro and unify APIs (#152)
This PR merges zigcoro inside the repo and reworks its internals to play
well with `stdx.meta`.

It also adds `Channel.try_{send,recv}` methods as well as dynamically
sized channels (with a `comptime` capacity).

Although not used, it also introduces a `PoolStackAllocator` for
allocating coroutine stacks from a pool
2025-01-14 19:33:16 +01:00