Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@mookums mookums released this 12 Mar 05:19
· 26 commits to main since this release
cd45406

This is the v0.3.0 release of Tardy and will be the next stable release! This supports Zig 0.14.

There has been a lot of work pretty much across the entire library since the v0.2.0 release. The API is also closer to being fully stabilized, I feel like this pattern right now is good at expressing intent and making it easy to consume.

We now utilize coroutines (Frames) instead of callbacks, allowing for better locality of behavior w/ concurrency. We have also provided better underlying types, such as File, Dir and Socket for interacting with the Runtime. These types also expose a Reader and Writer, allowing for better interop with libraries not designed around Tardy.

The busy_loop backend has now been replaced with poll, allowing for better performance on Windows (Would still love to have IOCP) and other POSIX-compliant platforms. A lot of bugs have been fixed across all of the Async backends, providing better stability.

We have also launched e2e, the seeded randomized tester. It generates random File and Socket operations that run on a thread, ensuring that concurrency is working correctly and that tasks are not blocking each other. It has already caught and helped solve various bugs (e889a43, c2421b9).

Changelist:

  • Socket now provides an init_with_address fn, allowing creating with just a std.net.Address and a Kind.
  • io_uring backend now properly handles INTR signals by just re-queuing job,
  • Reader and Writer interfaces provided for the Socket and File type, allowing for better integration with other libraries that aren't natively built for Tardy.
  • Callbacks removed in favor of Coroutines (called Frames internally), allowing for much nicer composition across the board.
  • New Filesystem API (including the new File and Dir struct that have pretty good inter-op with the standard library equivalents)
  • New Socket API (including the new Socket struct). This officially supports TCP, UDP and Unix. It also properly supports getting address information about sockets now.
  • Switch from the busy_loop to poll on POSIX-compliant systems, providing better cross-platform support.
  • Support for unlimited max tasks for workloads with an unknown number of maximum tasks. This is supported through changes to the underlying Pool implementation.
  • Switched AsyncIO struct to utilize a VTable approach, better standardizing the implementation.
  • Async I/O implementations now provide the runtime with a list of Async capabilities. If an action is queued that is not supported by the Async I/O backend, it is handled through a non-blocking yielding loop.
  • Stream abstraction for I/O.
  • EXPERIMENTAL: improved performance on SPSC channel.
  • EXPERIMENTAL: SPSC minimum channel size is now 2.
  • EXPERIMENTAL: Added triggers, allowing for tasks to suspend until they are woken up by a different task in the future.
  • EXPERIMENTAL: Added a SPSC Channel, allowing for crosstask and crossthread communication.

What's Changed

  • Async Overhaul (Frames + Poll) by @mookums in #7
  • library only compiles when the zig compiler versions match by @Torbatti in #8
  • Add Reader/Writer Interfaces to File and Socket by @mookums in #11
  • Fix E2E CI issue with TCP Chain on MacOS by @mookums in #17

New Contributors

Full Changelog: v0.2.1...v0.3.0