mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-21 15:04:51 +00:00
# Objective While working on something else, I noticed that I sometimes get this warning about a foreground hang: ``` 2026-08-19T11:25:45+02:00 INFO [zed::reliability::hang_detection::logging] New foreground hang detected: Tasks(s) that ran too long 215.24375ms - crates/cloud_api_client/src/websocket/native.rs:34:23 ``` That I believe can just be safely moved to the background, unless I'm missing something here. ## Solution Spawn the websocket task on the background instead of on the foreground, so that we can't hang the foreground thread anymore for **~200ms**. ## Testing I have tested that I can still connect to the websocket, not sure what else to test. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - N/A --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-APACHE | ||