Register the foreground thread with the GPUI profiler before starting hang detection, so foreground task statistics are available when the hang detection thread samples profiler data. cc: @yara-blue I choose to leave the expect statements because it seems like an invariant that we should uphold. Let me know if you would rather have early returns and telemetry if they're hit Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes FR-58 Release Notes: - Fixed a crash in hang detection when foreground thread statistics were missing. --------- Co-authored-by: Yara <git@yara.blue>
2 files changedLine totals unavailable