EMILUA(3em)
π» EMILUA π»
Hey bestie, welcome to the emilua reference page for section 3em β itβs giving Lua execution engine energy, and weβre about to get into it. π¦β¨
πΈ NAME πΈ
Emilua β Lua execution engine. Thatβs the whole name vibe. π
π DESCRIPTION π
Okay so picture a recursive mutex β yes, thatβs the thing. A fiber that already has exclusive ownership of a given recursive_mutex instance can call lock() or try_lock() to acquire an additional level of ownership of the mutex. And because recursion is a lil greedy, unlock() must be called once for each level of ownership acquired by a single fiber before ownership can be acquired by another fiber. Thatβs the rule, bestie. π
π οΈ FUNCTIONS π οΈ
π± new() β recursive_mutex
new() β recursive_mutex
Constructor. It makes the recursive_mutex, periodt. π
π lock(self)
lock(self)
Locks the mutex.
β οΈ Note: This suspending function does not act as a cancellation point.
π Note: This mutex applies dispatch semantics. That means no context switch to other ready fibers will take place if itβs possible to acquire the mutex immediately.
π² try_lock(self) β boolean
try_lock(self) β boolean
Tries to lock the mutex. Returns whether lock acquisition was successful. π
π€ Note: The current fiber is never suspended.
π unlock(self)
unlock(self)
Unlocks the mutex.
π Thatβs the EMILUA(3em) page, bestie β sign-off brought to you by Emilua 0.12.1-nixpkgs1, dated 1980-01-01. Stay iconic. π
β¨
π¦ 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