mitchellh / libxev

libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more and works on Linux (io_uring or epoll), macOS (kqueue), and Wasm + WASI. Available as both a Zig and C API.
MIT License
2.15k stars 77 forks source link

std.ArrayList support for [Read/Write]Buffers #83

Open kitsuniru opened 10 months ago

robbielyman commented 2 months ago

sorry for the necro-bump, but i'd be curious about what isn't working with status quo libxev. for example to read into an ArrayList with libxev, just pass something like .{ .slice = list.unusedCapacitySlice() } to the call to read. to reuse the ArrayList when reading, make it a field of your userdata and update the list in the callback.