-
Notifications
You must be signed in to change notification settings - Fork 48
Add lunatik objects to README #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add lunatik objects to README #340
Conversation
Signed-off-by: Ashwani Kumar Kamal <ashwanikamal.im421@gmail.com>
|
|
||
| The lifetime of an object is not tied solely to Lua garbage collection. An object remains alive as long as at least one reference exists. | ||
|
|
||
| Some objects expose an explicit *stop* or *close* operation, which releases internal resources (such as Lua states or kernel hooks) before the object itself is freed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Lua states" seems misleading here.. see https://www.lua.org/manual/5.4/manual.html#lua_State
|
|
||
| Lua garbage collection may release Lua references to an object, but this does not necessarily destroy the underlying kernel object. Garbage collection typically results in a reference counter decrement. | ||
|
|
||
| Kernel-held references keep the object alive even after all Lua references are gone. For deterministic cleanup, objects should be explicitly stopped or unloaded when appropriate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give an example?
| Lunatik exposes kernel facilities to Lua through *objects*. A Lunatik object is a Lua userdata that represents a kernel-resident resource and is shared between Lua and C code. | ||
|
|
||
| Internally, each Lunatik object combines: | ||
| - a Lua userdata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per runtime, right? each object might correspond to many userdata.
|
@sneaky-potato are you still working on this? |
|
Hi @lneto , yes. I’ve been a bit caught up with other work lately, but I haven’t dropped it and will resume once things free up. Thanks for checking! I will mark the PR as draft for now. |
No worries, I'm just planning the next release.. thanks! |
Fixes #183