Skip to content

Conversation

@Akeit0
Copy link
Collaborator

@Akeit0 Akeit0 commented May 15, 2025

As long as multi-threaded cancellation is performed, infinite loops can be avoided.

local ret = 0
::loop::
ret = ret + 1
goto loop
return ret
var state = LuaState.Create();
var cancellationTokenSource = new CancellationTokenSource();
cancellationTokenSource.CancelAfter(100);
await state.DoStringAsync(source, "@test.lua", cancellationTokenSource.Token);
Lua.LuaCancelledException : The operation was cancelled during execution on Lua.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants