EMILUA(3em)

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

πŸ’» 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