Releases: floscodes/futurez
Releases · floscodes/futurez
v0.2.0 – Zig 0.16 support & rename to future
What's Changed
Renamed: coroutinez → futurez
The project has been renamed to futurez to better reflect what it actually does: a thread-pool-based future/task runtime, not a coroutine runtime.
Zig 0.16 support
- Migrated from std.Thread.Mutex/std.Thread.Condition to std.Io.Mutex/std.Io.Condition
- Migrated from the managed std.ArrayList API to the new unmanaged API
- Replaced std.time.sleep (removed in 0.16)
Bug fixes
- initWithCores did not actually limit the thread count (passed wrong argument to initRuntime)
- Iterator invalidation in deinit when multiple tasks were unjoined (for loop over a slice that was modified during iteration)
- Memory leak in spawn when task_queue.append failed — allocations were not cleaned up
- Functions returning !T (error unions) were unsafely cast; the output field now stores only the payload type
- testfn3 hardcoded std.testing.allocator internally instead of accepting an allocator as parameter
- Use-after-free in workerThread: t.cond.broadcast() was called after mutexUnlock, giving join() a window to free the task first — fixed by broadcasting before
unlocking - Wrong import name in examples/basic.zig; const rt was const instead of var