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

chore: align MPSC queue with standard head/tail naming #124

Open Hanaasagi opened 1 month ago

Hanaasagi commented 1 month ago

Rename head and tail pointer operations in the MPSC queue to align with standard queue semantics. Producers now push to the tail, and the consumer pops from the head, ensuring correct behavior and improving code clarity.

This change also aligns the implementation with the one in queue.zig, maintaining consistency across the project. https://github.com/mitchellh/libxev/blob/b8d1d93e5c899b27abbaa7df23b496c3e6a178c7/src/queue.zig#L18-L35.