From a57690123ae3ce5bdd7e970690f1380e88e4eaf6 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 17 Mar 2025 12:34:08 +0100 Subject: Raise a regular Lua error instead of throwing a C++ std::logic_error exception in Universe::UniverseGC --- unit_tests/scripts/lane/uncooperative_shutdown.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unit_tests/scripts') diff --git a/unit_tests/scripts/lane/uncooperative_shutdown.lua b/unit_tests/scripts/lane/uncooperative_shutdown.lua index 51e5762..89e1ff8 100644 --- a/unit_tests/scripts/lane/uncooperative_shutdown.lua +++ b/unit_tests/scripts/lane/uncooperative_shutdown.lua @@ -8,7 +8,7 @@ local lanes = require "lanes".configure{shutdown_timeout = 0.001, on_state_creat -- launch lanes that blocks forever local lane = function() local fixture = require "fixture" - fixture.forever() + fixture.sleep_for() end -- the generator @@ -20,5 +20,5 @@ local h1 = g1() -- wait until the lane is running repeat until h1.status == "running" --- let the script end, Lanes should throw std::logic_error because the lane did not gracefully terminate +-- this finalizer returns an error string that telling Universe::__gc will use to raise an error when it detects the uncooperative lane lanes.finally(fixture.throwing_finalizer) -- cgit v1.2.3-55-g6feb