EMILUA(3em)
π NAME π
okay bestie, you're reading EMILUA(3em) from the Emilua reference, and the main character here is Emilua β a Lua execution engine. π¦β¨
β¨ DESCRIPTION β¨
Futures and promises. That's highkey the whole menu, bestie. π
π Note: this implementation follows the model of shared futures. Thus multiple waiters on the same future are allowed. no cap. π
πΈ FUNCTIONS πΈ
π new() β promise, future π
Constructor, periodt. It creates a promise and its associated future and returns them. Both. Together. Iconic. π
π¦ future FUNCTIONS π¦
π get(self) β value π
If result is available, it returns result. Otherwise, it blocks the current fiber until result is ready and returns it. the way that this just blocks the current fiber is giving patience, lowkey. π
π promise FUNCTIONS π
π
set_value(self, v) π
Atomically stores the value (v) into the shared state and makes the state ready. boom, slay. β¨
π set_error(self, e) π
Atomically stores the exception e into the shared state and makes the state ready. error girl summer, but make it atomic. ππ₯
that's the whole page, bestie π«Ά this gem is from Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and it's chillin' in manual section 3em. go off, icon. ππ
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms