Skip to content

integrate std.os.write and equivalent with evented I/O #3557

@andrewrk

Description

@andrewrk

The main change to do is:

-            EAGAIN => unreachable, // This function is for blocking writes.
+            EAGAIN => if (std.event.Loop.instance) |loop| {
+                loop.waitUntilFdWritable(fd);
+                continue;
+            } else {
+                return error.WouldBlock;
+            },

And then fix everything that breaks. This involves changes to std.io.OutStream, and unfortunately std.fmt.format. I was going to do this change as part of the std.net branch (#3538) but it got tricky, so I'm opening a separate issue for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions