Skip to content
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

Question regarding one of the listed limitations of Lua_Lanes #5

Closed
VaasKahnGrim opened this issue Apr 29, 2019 · 1 comment
Closed
Assignees
Labels

Comments

@VaasKahnGrim
Copy link

Does this specific limitation apply to the module
"Multi-CPU is done with OS threads, not processes. A lane is a Lua full userdata, therefore it will exist only as long as the Lua state that created it still exists. Therefore, a lane won't continue execution after the main program's termination."

Specifically the part about using OS threads not processes. aswell if this limitation does apply, is there already a means of removing old lanes no longer being used when say a server shuts down? For example lets say 4 lanes were made and then the normal gmod lua state. when srcds is shut down, do these lanes get cleaned up with it or no? and if not is it possible to implement a means of cleaning them up?

@danielga danielga self-assigned this Apr 29, 2019
@danielga
Copy link
Owner

When a process is terminated, any resources associated to it get freed. This includes OS threads and any Lua states. Nothing gets left behind (unless there's bugs in the OS but that's another thing). However, you should make sure to finish any work on any Lane to prevent losing data but that's up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants