EMILUA(3em)
π EMILUA(3em) π
okay bestie, welcome to the EMILUA(3em) page β the Emilua reference. Itβs literally the Lua execution engine manual and weβre gonna make it make sense. β¨
β¨ NAME β¨
Emilua β Lua execution engine.
π DESCRIPTION π
This class is all about waiting for one or more signals to occur. Like, itβs giving signal-bouncer energy, but make it Lua. π
local set = system.signal.set.new(system.signal.SIGTERM, system.signal.SIGINT)
set:wait()
### β οΈ Note: Multiple registration of signals so the Boost.Asio docs athttps://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/signal_set.html#boost_asio.reference.signal_set.multiple_registration_of_signalssay this, translated to fibers/emilua lingo: The same signal number may be registered with differentsetobjects. When the signal occurs, one signal notification is queued for eachsetobject.
π FUNCTIONS π
πΈ new([sig1: integer, ...]) β system.signal.set
Constructor. The arguments are treated as signals to be added to the set. No cap.
Note: only the main VM on the process may create newsetobjects. If the VM elects another VM to be the new main VM, its oldsetobjects will remain valid and working, but the VM wonβt be able to create newsetobjects. iykyk.
π§ add(self, signal: integer)
Add a signal to the set.
Note: only the master VM is allowed to use this function. periodt.
π¦ remove(self, signal: integer)
Remove a signal from the set.
π clear(self)
Remove all signals from the set.
β cancel(self)
Cancel all operations associated with the set.
π wait(self) β integer
Wait for a signal to be delivered. The function will return when:
- One of the registered signals in the set occurs; or
- The set was cancelled, in which case the function will raise the exception
boost::asio::error::operation_aborted.
A number is returned to indicate which signal occurred. iconic.
### π Note: Queueing of signal notifications As the Boost.Asio docs athttps://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/signal_set.html#boost_asio.reference.signal_set.queueing_of_signal_notificationssay (translated to fibers/emilua lingo): If a signal is registered with aset, and the signal occurs when there are no calls towait(), then the signal notification is queued. The next call towait()on that set will dequeue the notification. If multiple notifications are queued, subsequentwait()calls dequeue them one at a time. Signal notifications are dequeued in order of ascending signal number. If a signal number is removed from aset(using theremove()member function) then any queued notifications for that signal are discarded.
okay thatβs the whole page, bestie. mwah π β from Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and yes itβs the EMILUA(3em) manual. slay. π«Ά
π¦ 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