summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-06-18 13:13:39 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-06-18 13:13:39 -0400
commite26727e03bb02d26b3f0d83f748dbd8eb88e4940 (patch)
tree22f0592fde6ef683f251b50d0e93adf5bef9f204 /indra/newview/tests
parent5cc4b42a3001be120e22f745460dbb76d8d8d018 (diff)
Remove special-case ~LuaState() code to call fiber.run().
Instead, make fiber.lua call LL.atexit(fiber.run) to schedule that final run() call at ~LuaState() time using the generic mechanism. Append an explicit fiber.run() call to a specific test in llluamanager_test.cpp because the test code wants to interact with multiple Lua fibers *before* we destroy the LuaState.
Diffstat (limited to 'indra/newview/tests')
-rw-r--r--indra/newview/tests/llluamanager_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/tests/llluamanager_test.cpp b/indra/newview/tests/llluamanager_test.cpp
index 2d525f7913..206dbd9e71 100644
--- a/indra/newview/tests/llluamanager_test.cpp
+++ b/indra/newview/tests/llluamanager_test.cpp
@@ -385,6 +385,12 @@ namespace tut
"fiber.launch('catch_special', drain, catch_special)\n"
"fiber.launch('requester(a)', requester, 'a')\n"
"fiber.launch('requester(b)', requester, 'b')\n"
+ // A script can normally count on an implicit fiber.run() call
+ // because fiber.lua calls LL.atexit(fiber.run). But atexit()
+ // functions are called by ~LuaState(), which (in the code below)
+ // won't be called until *after* we expect to interact with the
+ // various fibers. So make an explicit call for test purposes.
+ "fiber.run()\n"
);
LLSD requests;