mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-04 07:51:17 -05:00
3c3010864d
LightcraftApp::shutdown gave GPU work at most the exit wait (2 s), the device warm-up included, and the Drop wait from #4697 is skipped once shutdown has run. A quit while a slow device start-up was still loading the driver therefore ended the process with the warm-up inside the Vulkan loader: exit() blocks on the loader lock or tears down libLLVM while the warm-up thread is running its constructors, and crashes. The warm-up can't be called off, so shutdown now waits for it past the render deadline, bounded by the same 30 s the Drop wait uses (now one constant, WARM_UP_EXIT_WAIT). Renders still give up after 2 s. Regression: quitting_waits_for_a_warm_up_past_the_exit_wait holds a substitute warm-up on the real gate and checks that shutdown(ZERO) does not return until it is released (in a child process, since shutdown is process-wide).