Support fast exit to speed up application shutdown#211
Conversation
- Add `--fastexit` CLI option (default: true). - Skip waiting for background tasks in `NextEngine::End` when fast exit is enabled. - Move `SaveLocTexts` to `NextEngine::End` to ensure data persistence before exit. - Use `std::quick_exit(0)` in `SDL_AppQuit` to bypass static destructors for rapid shutdown.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
目前run.bat好像也会导致残留,现象是关闭程序后,command始终没有恢复,这个问题也需要解决 |
I have updated |
- Add `--fastexit` CLI option (default: true). - Skip waiting for background tasks in `NextEngine::End` when fast exit is enabled. - Move `SaveLocTexts` to `NextEngine::End` to ensure data persistence before exit. - Use `std::quick_exit(0)` in `SDL_AppQuit` to bypass static destructors for rapid shutdown. - Update `run.ps1` to use direct call operator `&` instead of `Start-Process` to fix console restoration issue.
This change addresses issue #210 by introducing a "fast exit" mechanism. By default, the engine will no longer wait for all background tasks to complete upon exit. Instead, it performs essential cleanup (like saving localization data) and then immediately terminates the process using
std::quick_exit, skipping the lengthy destruction of static objects and thread synchronization. This behavior can be disabled with--fastexit=false.PR created automatically by Jules for task 14075704582197301851 started by @gameknife