diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-07-11 11:35:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 11:35:34 -0400 |
commit | 014bfc04be6638533216f1ea18884d38632c5a99 (patch) | |
tree | 9b7c65188ab4abcb7aa6f022438d3b7885c9e834 /indra/newview/scripts/lua | |
parent | 89e7ca66cbadd9b5a3b31e6d12e310b1c7a3c5c1 (diff) | |
parent | b032abe2074949074c893153d992ae264c34116a (diff) |
Merge pull request #1984 from secondlife/lua-no-reuse
Remove ability to reuse a `LuaState` between `LLLUAmanager` functions.
Diffstat (limited to 'indra/newview/scripts/lua')
-rw-r--r-- | indra/newview/scripts/lua/require/fiber.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/fiber.lua b/indra/newview/scripts/lua/require/fiber.lua index cae27b936b..b3c684dd67 100644 --- a/indra/newview/scripts/lua/require/fiber.lua +++ b/indra/newview/scripts/lua/require/fiber.lua @@ -337,4 +337,10 @@ function fiber.run() return idle_done end +-- Make sure we finish up with a call to run(). That allows a consuming script +-- to kick off some number of fibers, do some work on the main thread and then +-- fall off the end of the script without explicitly calling fiber.run(). +-- run() ensures the rest of the fibers run to completion (or error). +LL.atexit(fiber.run) + return fiber |