Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
New features:
openat
), and can safely share OS resources between domains.Fiber.fork_seq
(@talex5 #460, reviewed by @avsm). This is a light-weight alternative to using a single-producer, single-consumer, 0-capacity stream, similar to a Python generator function.Bug fixes:
EIO_BACKEND
handling more uniform (@talex5 #447). Previously this environment variable was only used on Linux. Now all platforms check it.EIO_BACKEND
(@talex5 #442). If this changes, dune needs to re-run the tests.read_exactly
fails to update file offset (@talex5 #438).enabled_if
bug on non-Linux systems (@polytypic #475, reviewed by @talex5).getrandom
for glibc versions before 2.25 (@zenfey #482).Documentation:
HACKING.md
with hints for working on Eio (@talex5 #443, reviewed by @avsm @polytypic).Performance:
/dev/zero
(@talex5 #439).Other changes:
pread
, pwrite
and readdir
(@talex5 #451).Some build fixes:
Fix build on various architectures (@talex5 #432).
%{system}
bug.max_luv_buffer_size
on 32-bit platforms.New features:
Eio.Net.run_server
(@bikallem @talex5 #408). Runs an accept loop in one or more domains, with cancellation and graceful shutdown, and an optional maximum number of concurrent connections.Buf_read.BE
and LE
parsers (@Cjen1 #399). Parse numbers in various binary formats.Eio.Buf_read.uint8
(@talex5 #418).Performance:
Eio.Condition
lock-free (@talex5 #397 #381). In addition to being faster, this allows using conditions in signal handlers.Eio.Semaphore
lock-free (@talex5 @polytypic #398).Eio.Stream
lock-free when the capacity is zero (@talex5 #413 #411).Eio.Promise
lock-free (@talex5 #401).Bug fixes:
Uring.submit
as needed (@talex5 @bikallem #428). Previously, we could fail to submit a job promptly because the SQE queue was full.libuv
automatically retries polling if it gets EINTR
, without giving OCaml signal handlers a chance to run.Buf_write.BE.uint48
and LE.uint48
(@adatario #418).Documentation:
run_server
(@talex5 #417).Fiber.first
(@talex5 #394).Eio.Time.now
(@bikallem #395).secure_random
as an infinite source (@patricoferris #426).Other changes:
SIGPIPE
handler until the run
function is called (@talex5 #420).process.md
test (@smondet #414).Mtime.Spand.to_s
has been deprecated in mtime 2.0.0 (@bikallem #385).API changes:
Eio.Io
(@talex5 #378). This makes it easy to catch and log all IO errors if desired. The exception payload gives the type and can be used for matching specific errors. It also allows attaching extra information to exceptions, and various functions were updated to do this.Time.Mono
for monotonic clocks (@bikallem @talex5 #338). Using the system clock for timeouts, etc can fail if the system time is changed during the wait.reuse_addr
and reuse_port
options.File.stat
and improve Path.load
(@haesbaert @talex5 #339). Path.load
now uses the file size as the initial buffer size.Eio_unix.pipe
(@patricoferris #350). This replaces Eio_linux.pipe
.getrandom(2)
(@haesbaert #344). Guards against buggy user code that might not handle this correctly.Flow.read
to Flow.single_read
(@talex5 #353). This is a low-level function and it is easy to use it incorrectly by ignoring the possibility of short reads.Bug fixes:
Socket_of_fd
and Socketpair
effects.Eio_mock.Backend
: preserve backtraces from main
(@talex5 #349).Switch.run_internal
(@talex5 #369).Documentation:
Fiber.first
(@talex5 #358, reported by @iitalics).Backend-specific changes:
Eio_luv.Low_level.Stream.write
(@patricoferris #359).Eio_luv.Low_level.get_loop
(@talex5 #371). This is needed if you want to create resources directly and then use them with Eio_luv.Eio_linux.Low_level.openfile
is gone (@talex5 #378). It was just left-over test code.Changes:
Flow.write
(@haesbaert #318). This provides an optimised alternative to copy
in the case where you are writing from a buffer.Net.with_tcp_connect
(@bikallem #302). Convenience function for opening a TCP connection.Eio.Time.Timeout
(@talex5 #320). Makes it easier to pass timeouts around.Eio_mock.Clock
(@talex5 #328). Control time in tests.Buf_read.take_while1
and skip_while1
(@bikallem #309). These fail if no characters match.Promise.t
covariant (@anmonteiro #300).Flow.source_string
(@c-cube #317). Slightly faster.Bug fixes:
Condition.broadcast
must interlock as well (@haesbaert #324).Net.connect
to be cancelled (@talex5 @nojb #311).Documentation:
New features:
Eio.Condition
(@TheLortex @talex5 #277). Allows a fiber to wait for some condition to become true.Eio.Net.getaddrinfo
and getnameinfo
(@bikallem @talex5 #278 #288 #291). Convert between host names and addresses.Eio.Debug
(@talex5 #276). Currently, this allows overriding the traceln
function.Buf_write.create
: make switch optional (@talex5 #283). This makes things easier for people porting code from Faraday.Bug fixes:
Other changes:
Mutex
, Semaphore
and Condition
in the README (@talex5 #281).Note: Eio 0.4 drops compatibility with OCaml 4.12+domains. Use OCaml 5.0.0~alpha1 instead.
API changes:
Eio.Dir
has gone. Use Eio.Path
instead (@talex5 #266 #270).Eio_unix.FD.{take,peek}
were renamed to take_opt
/peek_opt
to make way for non-optional versions.New features:
Eio.Path.{unlink,rmdir,rename}
(@talex5 #264 #265).Eio_main.run
can now return a value (@talex5 #263). This is useful for e.g. cmdliner.Eio_unix.socketpair
(@talex5 #260).Fiber.fork_daemon
(@talex5 #252). Create a helper fiber that does not prevent the switch from exiting.Fiber.{iter,map,filter,fiter_map}
(@talex5 #248 #250). These are concurrent versions of the corresponding operations in List
.Bug fixes:
Eio.Net.Connection_reset
exception in more places (@talex5 #257).Buf_write
still flushes if an exception is raised (@talex5 #246).accept_fork
socket (@talex5 #245).Documentation:
API changes:
Net.accept_sub
is deprecated in favour of accept_fork
(@talex5 #240). Fiber.fork_on_accept
, which it used internally, has been removed.Read_source_buffer
(@talex5 #239). The reader is no longer required to consume all the data in one go. Also, add Linux_eio.Low_level.writev_single
to expose this behaviour directly.Eio.Unix_perm
is now Eio.Dir.Unix_perm
.New features:
Eio.Mutex
(@TheLortex @talex5 #223).Eio.Buf_write
(@talex5 #235). This is a buffered writer for Eio sinks, based on Faraday.Eio_mock
library for testing (@talex5 #228). At the moment it has mock flows and networks.Eio_mock.Backend
(@talex5 #237 #238). Allows running tests without needing a dependency on eio_main. Also, as it is single-threaded, it can detect deadlocks in test code instead of just hanging.Buf_read.{of_buffer, of_string, parse_string{,_exn}, return}
(@talex5 #225).<*>
combinator to Buf_read.Syntax
(@talex5 #227).Eio.Dir.read_dir
(@patricoferris @talex5 #207 #218 #219)Performance:
Buf_read
benchmark and optimise it a bit (@talex5 #230).Buf_read.consume
to improve performance (@talex5 #232).Bug fixes / minor changes:
traceln
without an effect handler (@talex5 #226). traceln
now works outside of an event loop too.getrandom
(@bikallem #212).Eio_linux: cope with lack of fixed chunks (@talex5 #200).
Eio_unix.FD.as_socket
(@talex5 #193). Useful for working with existing libraries that provide a Unix.file_descr
, or for receiving FDs from elsewhere (e.g. socket activation). Also, the Luv.{File,Handle}.of_luv
functions now allow controlling whether to close the wrapped FD.Eio_unix.sleep
(@talex5 #188). Based on feedback that some people don't want to treat time as a capability. Possibly also useful for debugging race conditions.Eio_null
backend (@talex5 #189). This supports creating fibers, promises and cancellation, but provides no IO operations.Effect.eff
is now Effect.t
in OCaml trunk (@talex5 #201).