-
Notifications
You must be signed in to change notification settings - Fork 189
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
rework luv work vm storage into userdata #757
Conversation
That passes ASAN as well: https://github.com/neovim/neovim/actions/runs/13037209814/job/36370486555?pr=32174 |
moves work vm storage into a garbage collected userdata. this allows for each lua state to manage its own storage. this removes the need for a global array of work vms.
|
|
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.
I like this more than the previous globals approach frankly.
Looks great to me |
With this merged, luv now passes all Neovim tests: neovim/neovim#32174 So if you can make a new fixup release, I'll be able to include it. Thanks! |
Moves work vm storage into a garbage collected userdata. Allowing for each lua state to manage its own storage. This completely removes the need for a global array of work vms.
Better than #755 because it does not introduce an extra interface that integrators have to deal with.
Essentially an expansion of #756 by using the userdata object to store the entire vm array.
In particular, this should mimic pre loop
__gc
behavior of multiple lua states having access to a pool of work vms and that pool being cleaned up automatically everywhere; the existing loop__gc
does not handle this case well, particularly when one state is closed first (the other state may then attempt to use closed lua states).Fixes #754