Skip to content

Releases: lalinsky/zio

v0.12.0

19 May 07:56

Choose a tag to compare

Added

  • std.Io: batch operations now support concurrent execution and timeouts (#387, #388)

Fixed

  • Fixed possible deadlock in RwLock.unlockShared (#395)
  • Fixed sockets not opened in non-blocking mode on the epoll backend (#392)
  • Fixed integer overflow when using .executors = .auto on machines with 64+ CPUs (#390)
  • Fixed coroutine stack allocation size doubling on POSIX (#386)

v0.11.0

11 May 10:28

Choose a tag to compare

Added

  • std.Io interface is now essentially complete. All major operations are implemented:
    • Spawn and wait on child processes, with non-blocking pipe I/O on POSIX.
    • Iterate over directory entries.
    • Create nested directory paths.
    • Create files atomically (write to temp file, then rename into place), with optional make_path
      and replace support.
    • Rename files without overwriting existing destinations.
    • Batch multiple file I/O operations for linear execution (concurrent execution is deferred).
  • Stream.Reader.fromStd and Stream.Writer.fromStd convert std.Io.net.Stream to zio's buffered
    reader/writer, enabling seamless interop between zio and std networking in the same program.

Changed

  • net.Stream.Reader and net.Stream.Writer are now lighter, storing only the socket handle instead of
    the full stream.

Fixed

  • Fixed a critical bug on Linux with the epoll backend where non-blocking network reads and writes could
    silently succeed with garbage data instead of returning error.WouldBlock.

v0.10.0

26 Apr 06:12

Choose a tag to compare

Added

  • Support for Zig 0.16.
  • Implementation of the std.Io interface. Supports fiber-based futures/groups, file and network operations.
    Still missing child process and batch operations. The rest of the codebase will be adjusted over time to align with std.Io
    to avoid some unnecessary type conversions.

Changed

  • server.accept() now takes options argument with timeout.

Fixed

  • Internal refactoring to handle data races on weakly ordered architectures in some cases.

v0.9.0

02 Mar 20:06

Choose a tag to compare

Added

  • Fully asynchronous DNS resolver on macOS and Windows using their native APIs.
  • Added support for 64-bit PowerPC CPUs.
  • Added RwLock for async readers-writer locking.
  • Added Timestamp.fromSeconds() and toSeconds() for second-based conversions.
  • Added Timestamp.untilNow() to get the duration elapsed since a timestamp.

Changed

  • Removed unused JoinHandle.cast() method.

Fixed

  • Fixed incorrect assert that could panic on a race between task finishing naturally and being cancelled.
  • Added some extra clobbers to context switching assembly, already implicitly covered by others, but for consistency.

v0.8.2

17 Feb 19:56

Choose a tag to compare

Fixed

  • Fixed dependency loop compilation error when using zio as a dependency module, by inlining Work.WorkFn and Work.CompletionFn type aliases.

v0.8.1

17 Feb 17:59

Choose a tag to compare

Added

  • Added blockInPlace for running blocking functions on the thread pool without allocations.
  • Added os.thread.yield() for yielding to the kernel from OS-level threads.

Changed

  • Removed LIFO slot optimization in the coroutine scheduler, to simplify the code while planning to rework the scheduler.
  • Added check that prevents coroutines from being called multiple times per one event loop iteration.
  • Internal refactoring of our WaitQueue primitive, to better express the semantics we need for synchronization primitives like Mutex or Condition.
  • Internal refactoring of our Waiter primitive, avoiding indirect function calls and more direct integration with select.

Fixed

  • Fixed error returned from Group task closing the group, even if not in fail-fast mode.

v0.8.0

09 Feb 11:49

Choose a tag to compare

Added

  • Added CompletionQueue for waiting on multiple I/O operations.
  • Added blocking I/O support for socket, pipe, poll, timer, and work operations. These operations can now be called from any thread without an async runtime.

Changed

  • Improved our CI setup, run significanly more tests in multi-threaded mode to catch possible race conditions.

Fixed

  • Fixed task migration race condition that could cause crashes under heavy multi-threaded load.
  • Fixed pipe read/write using wrong offset in io_uring backend.
  • Fixed NetBSD test failures.

v0.7.0

06 Feb 07:06

Choose a tag to compare

Added

  • Added CI for 32-bit ARM/Thumb and RISC-V CPUs to make sure these don't break.

Changed

  • BREAKING: Removed rt parameter from most functions. It's no longer needed.
    You can now use zio.spawn, zio.sleep, or zio.yield instead of calling
    them as rt methods.
  • Synchronization primitives like Mutex, Condition or Channel can be now used
    from any thread, outside of coroutines, or across multiple runtimes.
  • Dir and File I/O operations can be now called from any thread and then will
    run regular blocking syscalls.
  • Internal: Update our user-mode futex implemenentation to a global hash table,
    to allow it to be used from any thread.
  • Internal: Replaced std.Thread synchronization primitives with custom OS wrappers.

v0.6.0

31 Jan 19:38

Choose a tag to compare

Added

  • Added support 32-bit ARM/Thumb and RISC-V CPUs
  • Added Pipe to explicitly support streaming-only file descriptors (#267)
  • Added Socket methods for configuring OS-level buffer sizes (#243)
  • Added custom panic handler that fully extends stack before calling the default handler
  • Added convenience fromXxx() methods to Timeout

Changed

  • All timeout parameters now accept Timeout instead of Duration (#238, #239)
  • Increased default stack committment to 256KiB to avoid stack overflows in the default panic handler
  • Internal refactoring to reduce memory usage and binary size

Fixed

  • Fixed possible race condition between Channel.close and task cancelation

v0.5.1

25 Jan 20:01

Choose a tag to compare

Added

  • Added readVec and writeVec methods to Stream (#236)
  • Added custom panic handler to avoid stack overflow during panics (#237)

Changed

  • Made ResetEvent.reset idempotent (#235)