EMILUA(3em)

πŸ“¦ version 0.12.1, in nixos 26.05, nixpkgs unstable

πŸ’… NAME

Emilua β€” Lua execution engine. Yep bestie, you’re in the Emilua reference page (EMILUA(3em)), and we’re about to make stream.write_at_least make sense. Periodt. ✨


✨ SYNOPSIS ✨

local stream = require "stream"
stream.write_at_least(io_object, buffer: byte_span, minimum: integer) -> integer

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this one writes data until a minimum number of bytes has been transferred, and it blocks the current fiber until it completes or errs. No cap. 😭

It returns the number of bytes written. That’s the whole vibe. πŸ’–

This is the same deal as the async_write overload1 reference in Boost.Asio: https://www.boost.org/doc/libs/1_77_0/doc/html/boost_asio/reference/async_write/overload1.html. And the Boost.Asio docs say, direct quote:

This operation is implemented in terms of zero or more calls to the stream’s async_write_some function, and is known as a composed operation. The program must ensure that the stream performs no other write operations (such as async_write, the stream’s async_write_some function, or any other composed operations that perform writes) until this operation completes.

So yeah β€” keep the stream’s other write operations out of the group chat until this one is done. It’s giving composed operation, and it’s lowkey important. 🫢πŸ”₯


xoxo, your Unix bestie πŸ’…πŸ’– β€” this page is from Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and it’s the EMILUA(3em) manual page. Slay. πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from