zed/crates
Conrad Irwin 6c9b813f38
Remove Executor::close() (#50970)
Co-Authored-By: Eric Holk <eric@zed.dev>

In app drop we had been calling `.close()` on the executors. This caused
problems with the BackgroundExecutor on Linux because it raced with
concurrent work: If task A was running and about to poll task B, the
poll to task B would panic with "Task polled after completion". This
didn't really matter (because the app was shutting down anyway) but
inflated our panic metrics on Linux.

It turns out that the call to `.close()` is not needed. It was added to
prevent foreground tasks being scheduled after the app was dropped; but
on all platforms the App run method does not return until after the
ForegroundExecutor is stopped (so no further tasks will run anyway).

The background case is more interesting. In test code it didn't matter
(the background executor is simulated on the main thread so tests can't
leak tasks); in app code it also didn't really make a difference. When
`fn main` returns (which it does immediately after the app is dropped)
all the background threads will be cancelled anyway.

Further confounding debugging, it turns out that the App does not get
dropped on macOS and Windows due to a reference cycle; so this was only
happening on Linux where the app quit callback is dropped instead of
retained after being called. (Fix in #50985)

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-03-07 04:11:45 +00:00
..
acp_thread agent: Only use AgentSessionInfo in history (#50933) 2026-03-06 13:13:23 +00:00
acp_tools ui: Improve performance in the CopyButton component (#47292) 2026-01-21 13:40:42 -03:00
action_log agent: Move file_read_times logic to ActionLog instead of Thread (#50688) 2026-03-04 10:31:29 +00:00
activity_indicator workspace: Move the update Zed button to the title bar (#48467) 2026-02-10 16:03:46 -03:00
agent Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
agent_servers Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
agent_settings Remove Agents Panel and utility panes (#49038) 2026-02-12 15:46:10 -05:00
agent_ui agent_ui: Add more refinements for v2 flag (#50968) 2026-03-06 19:47:04 -03:00
ai_onboarding acp: Claude Code -> Claude Agent (#49345) 2026-02-17 10:41:10 +00:00
anthropic Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
askpass Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
assets
assistant_slash_command Handle removed IconName variants in text thread deserialization (#47624) 2026-01-26 23:56:55 +00:00
assistant_slash_commands build: Tear up crate graph (move terminal closer to editor) (#48602) 2026-02-06 20:14:35 +01:00
assistant_text_thread Add fast mode toggle in agent panel (#49714) 2026-02-26 21:19:41 +01:00
audio Use updated version of our fork of rust-sdks (#50205) 2026-02-27 20:22:03 +01:00
auto_update auto_update: Persist custom icons across app updates on macOS (#49727) 2026-02-24 22:20:57 +00:00
auto_update_helper Try to fix auto-updates when Explorer.exe holds Zed.exe (#50332) 2026-03-03 17:47:35 +01:00
auto_update_ui auto_update_ui: Add announcement toast component (#49543) 2026-02-19 10:41:16 -03:00
aws_http_client
bedrock bedrock: Add Claude Sonnet 4.6 (#49439) 2026-02-19 07:23:27 +01:00
breadcrumbs Clean up some Cargo.toml files (#48623) 2026-02-06 20:21:19 +00:00
buffer_diff editor: Clean up tab_map (#49606) 2026-03-02 09:24:04 +00:00
call workspace: Invert dependency on call crate by extracting into a trait (#49968) 2026-02-24 11:19:34 +00:00
channel Fix race condition in channel notes rejoin (#50034) 2026-02-25 05:48:59 +00:00
cli zed: Clear the FORCE_CLI_MODE environment variable after reading (#46475) 2026-03-06 19:18:33 +00:00
client Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
clock text: Narrow insertion-relative offsets from usize to u32 (#49801) 2026-02-25 08:12:04 +01:00
cloud_api_client cloud_api_client: Send the organization ID in LLM token requests (#50517) 2026-03-04 15:45:33 +01:00
cloud_api_types cloud_api_client: Send the organization ID in LLM token requests (#50517) 2026-03-04 15:45:33 +01:00
cloud_llm_client Include optional model version with EP acceptance and rejection messages (#50262) 2026-02-27 01:07:37 +00:00
codestral Fix Codestral API key credentials URL mismatch (#48513) 2026-02-05 17:34:34 -05:00
collab git: Move diff num stat calculation to repository snapshot layer (#50645) 2026-03-04 18:54:23 +00:00
collab_ui Detect leaked entities at the end of test runs (#50400) 2026-03-02 12:04:13 +01:00
collections
command_palette workspace: Properly flush effects in send_keystrokes_impl (#50486) 2026-03-02 15:37:59 +01:00
command_palette_hooks
component
component_preview gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
context_server Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050) 2026-01-30 21:26:13 +00:00
copilot Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
copilot_chat copilot: Display cost multiplier for Github Copilot models (#44800) 2026-02-16 15:24:59 -03:00
copilot_ui Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
crashes crashes: Bump minidumper crate to 0.9 (#50937) 2026-03-06 17:06:35 +01:00
credentials_provider
csv_preview Add CSV preview with live table view and interactive features (#48207) 2026-03-03 15:49:40 +01:00
dap dap: Make ProtoConversion::to_proto consume self (#47871) 2026-01-28 16:00:52 +00:00
dap_adapters util: Always use posix_spawn on macOS even with pre_exec hooks (#49090) 2026-02-13 20:16:11 +01:00
db Increase SQLite busy_timeout from 1ms to 500ms (#49039) 2026-02-12 16:26:13 +00:00
debug_adapter_extension
debugger_tools Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
debugger_ui terminal: Fix drag-and-drop in vertical terminal panels (#49825) 2026-03-06 11:37:14 +02:00
deepseek
denoise
dev_container Handle empty match list and do safe vector selection instead of slicing (#50232) 2026-02-26 17:06:24 +00:00
diagnostics Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
docs_preprocessor docs: Add consent banner (#50302) 2026-03-04 15:38:31 +01:00
edit_prediction ep: Unify code in parse_output and zeta_prompt (#50958) 2026-03-06 22:07:54 +02:00
edit_prediction_cli ep: Add captured example fetching (#50960) 2026-03-06 15:09:36 -05:00
edit_prediction_context buffer_diff: Do not block on parsing in set_snapshot_with_secondary_inner (#50385) 2026-02-28 11:53:06 +00:00
edit_prediction_types Differentiate between explicit rejection and ignored in ep acceptance tracking (#48409) 2026-02-04 17:54:11 -05:00
edit_prediction_ui ep: Refresh available experiments when opening ep button (#50949) 2026-03-06 16:23:06 +00:00
editor gpui: Add property_test macro (#50935) 2026-03-06 14:03:45 +00:00
encoding_selector Revert PRs for landing in main (#48969) 2026-02-12 00:28:17 +00:00
etw_tracing time_format: Add Windows implementation (#50227) 2026-02-28 21:47:30 -05:00
eval Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
eval_cli Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
eval_utils gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
explorer_command_injector explorer_command_injector: Avoid COM out-pointer overwrite in class factory exports (#49210) 2026-02-28 22:42:19 -05:00
extension extension: Stream wasi-sdk download (#49679) 2026-02-20 07:25:53 +00:00
extension_api extension_api: Add digest to GithubReleaseAsset (#48413) 2026-02-05 12:13:02 +00:00
extension_cli gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
extension_host extension_host: Allow extensions to define semantic highlighting rules (#49282) 2026-03-02 17:54:53 +01:00
extensions_ui Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
feature_flags Remove agent git worktree feature flag (#50778) 2026-03-05 15:04:56 -05:00
feedback
file_finder file_finder: Remove project's root name from the file finder history (#46957) 2026-02-13 16:05:40 +00:00
file_icons
fs git: Move diff num stat calculation to repository snapshot layer (#50645) 2026-03-04 18:54:23 +00:00
fs_benchmarks gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
fuzzy
git git: Allow committing in restrictive worktrees (#50749) 2026-03-04 21:37:25 +00:00
git_graph git: Fix conflicted paths not getting cleared (#50327) 2026-03-02 13:40:34 +00:00
git_hosting_providers Implement extract_pull_request for GitLab provider (#47973) 2026-01-31 21:56:34 +00:00
git_ui git_ui: Add ability to delete git worktrees from picker (#50015) 2026-03-04 21:49:06 +00:00
go_to_line Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
google_ai Remove deprecated Gemini 3 Pro Preview (#50503) 2026-03-04 15:53:26 +00:00
gpui Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
gpui_linux Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
gpui_macos Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
gpui_macros gpui: Add property_test macro (#50935) 2026-03-06 14:03:45 +00:00
gpui_platform gpui_web: Implement fetch based HTTP client (#50463) 2026-03-02 16:18:01 +01:00
gpui_tokio
gpui_util GPUI on the web (#50228) 2026-02-26 18:36:50 +01:00
gpui_web Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
gpui_wgpu Linux: Handle device lost with wgpu (#50898) 2026-03-05 22:59:48 -07:00
gpui_windows Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
html_to_markdown
http_client cloud_api_client: Send the organization ID in LLM token requests (#50517) 2026-03-04 15:45:33 +01:00
http_client_tls
icons Implement new Multi Agent UI (#50534) 2026-03-05 20:22:28 +00:00
image_viewer image_viewer: Use checkerboard from GPUI (#49575) 2026-02-24 12:56:59 +01:00
inspector_ui Reduce amount of closure monomorphizations part 2 (#49688) 2026-02-20 08:32:45 +00:00
install_cli Revert PRs for landing in main (#48969) 2026-02-12 00:28:17 +00:00
journal Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
json_schema_store Fix docs validation to detect unknown keys (#49660) 2026-02-19 20:46:21 -05:00
keymap_editor Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
language editor: Add support for no auto-indent on enter (#47751) 2026-03-04 20:29:20 +00:00
language_extension languages: Add support for passing user settings to Go LSP adapter (#50472) 2026-03-02 09:33:48 +00:00
language_model Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
language_models ai: Add LMStudio API URL & API key support (#48309) 2026-03-06 16:49:55 +00:00
language_onboarding
language_selector language_selector: Auto-select current language when opening (#48475) 2026-02-26 15:18:25 +00:00
language_tools buffer_diff: Do not block on parsing in set_snapshot_with_secondary_inner (#50385) 2026-02-28 11:53:06 +00:00
languages python: Fix conda environment not auto-activated in remote terminal (#50895) 2026-03-06 07:51:30 +00:00
line_ending_selector
livekit_api Update Rust crate jsonwebtoken to v10 [SECURITY] (#48294) 2026-02-03 15:51:40 -05:00
livekit_client Use updated version of our fork of rust-sdks (#50205) 2026-02-27 20:22:03 +01:00
lmstudio ai: Add LMStudio API URL & API key support (#48309) 2026-03-06 16:49:55 +00:00
lsp git: Move diff num stat calculation to repository snapshot layer (#50645) 2026-03-04 18:54:23 +00:00
markdown markdown_preview: Enable parser options individually (#50440) 2026-03-05 14:00:08 +00:00
markdown_preview markdown_preview: Fix slow checkbox check/uncheck UI updates (#48633) 2026-03-06 17:23:50 +01:00
media
menu
migrator editor: Add support for no auto-indent on enter (#47751) 2026-03-04 20:29:20 +00:00
miniprofiler_ui project_panel: Fix scrolling in empty area below file list (#50683) 2026-03-04 19:13:32 +01:00
mistral mistral: Enable streaming tool calls (#50793) 2026-03-05 08:59:05 +00:00
multi_buffer editor: Remove folded buffer ID on all excerpts removed (#50525) 2026-03-02 22:13:09 +00:00
nc acp: Claude Code -> Claude Agent (#49345) 2026-02-17 10:41:10 +00:00
net Add ETW profile recorder action (#49712) 2026-02-20 13:36:04 +00:00
node_runtime util: Always use posix_spawn on macOS even with pre_exec hooks (#49090) 2026-02-13 20:16:11 +01:00
notifications
ollama ollama: Remove backwards compatibility for Ollama tool call IDs (#49246) 2026-02-16 14:33:29 +00:00
onboarding Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
open_ai Add GPT-5.4 and GPT-5.4-pro BYOK models (#50858) 2026-03-05 23:40:03 -05:00
open_path_prompt Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
open_router Add user picked model to be used as a default for open router provider when generating comments and thread summary (#47475) 2026-02-12 14:02:16 +00:00
outline Revert "outline: Refactor outline render_item to reuse existing TextStyle (#49166)" (#50258) 2026-02-26 23:27:24 +00:00
outline_panel Revert "outline: Refactor outline render_item to reuse existing TextStyle (#49166)" (#50258) 2026-02-26 23:27:24 +00:00
panel build: Decouple git_ui from recent_projects (#48062) 2026-02-02 13:30:07 +01:00
paths Remove Supermaven-related code from Zed (#50537) 2026-03-02 22:18:49 +00:00
picker picker: Prevent clicking non-selectable entries from confirming selection (#50705) 2026-03-05 18:59:01 +00:00
platform_title_bar multiworkspace: Disable sidebar if disable_ai is enabled (#50137) 2026-02-25 23:01:59 +00:00
prettier Add configurable LSP timeout setting (#44745) 2026-02-07 00:36:37 +00:00
project agent: Don't connect to MCP servers when AI is globally disabled (#47857) 2026-03-06 17:21:44 +01:00
project_benchmarks gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
project_panel Implement new Multi Agent UI (#50534) 2026-03-05 20:22:28 +00:00
project_symbols Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
prompt_store Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050) 2026-01-30 21:26:13 +00:00
proto git: Move diff num stat calculation to repository snapshot layer (#50645) 2026-03-04 18:54:23 +00:00
recent_projects Implement new Multi Agent UI (#50534) 2026-03-05 20:22:28 +00:00
refineable
release_channel
remote Fix a few cases where we weren't escaping shell vars correctly (#50562) 2026-03-02 23:31:11 -07:00
remote_connection build: Decouple git_ui from recent_projects (#48062) 2026-02-02 13:30:07 +01:00
remote_server git: Move diff num stat calculation to repository snapshot layer (#50645) 2026-03-04 18:54:23 +00:00
repl Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
reqwest_client gpui: Reduce amount of wasm cfgs in gpui (#50278) 2026-02-27 09:18:03 +00:00
rich_text
rope rope: Improve prepend performance for small inputs on small ropes (#50389) 2026-02-28 12:54:09 +01:00
rpc Support LSP document symbols in breadcrumbs and outline UI (#48780) 2026-02-11 21:30:03 +02:00
rules_library picker: Prevent clicking non-selectable entries from confirming selection (#50705) 2026-03-05 18:59:01 +00:00
scheduler Remove Executor::close() (#50970) 2026-03-07 04:11:45 +00:00
schema_generator
search search: Fix popover spacing for split diff buttons (#49655) 2026-03-01 10:11:15 +00:00
session Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
settings editor: Add support for no auto-indent on enter (#47751) 2026-03-04 20:29:20 +00:00
settings_content ai: Add LMStudio API URL & API key support (#48309) 2026-03-06 16:49:55 +00:00
settings_json
settings_macros
settings_profile_selector Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
settings_ui editor: Add support for no auto-indent on enter (#47751) 2026-03-04 20:29:20 +00:00
shell_command_parser Skip /dev/null redirects from terminal auto-allow command extraction (#49503) 2026-02-18 13:01:01 -05:00
sidebar agent_ui: Add more refinements for v2 flag (#50968) 2026-03-06 19:47:04 -03:00
snippet
snippet_provider extension_cli: Validate that all snippets can be parsed (#47649) 2026-01-26 13:49:26 +00:00
snippets_ui Revert PRs for landing in main (#48969) 2026-02-12 00:28:17 +00:00
sqlez Reduce amount of closure monomorphizations part 2 (#49688) 2026-02-20 08:32:45 +00:00
sqlez_macros
story
storybook gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
streaming_diff
sum_tree gpui: Add property_test macro (#50935) 2026-03-06 14:03:45 +00:00
svg_preview Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
system_specs
tab_switcher vim: Make :bdelete use new workspace::CloseItemInAllPanes command (#48988) 2026-02-12 12:33:51 +00:00
task Fix VSCode tasks.json parsing for tasks without explicit labels (#47754) 2026-02-12 16:30:47 +00:00
tasks_ui Re-add MultiWorkspace (#48800) 2026-02-12 01:06:23 +00:00
telemetry
telemetry_events ep_cli: rated-after: query (#47906) 2026-01-28 16:36:44 -08:00
terminal terminal: Fix drag-and-drop in vertical terminal panels (#49825) 2026-03-06 11:37:14 +02:00
terminal_view terminal: Fix drag-and-drop in vertical terminal panels (#49825) 2026-03-06 11:37:14 +02:00
text Add more verbosity for panic inside summaries_for_anchors_with_payloads (#50940) 2026-03-06 15:03:21 +00:00
theme Add .cppm (C++20 module interface) to C++ file extensions (#50667) 2026-03-04 10:30:33 +00:00
theme_extension
theme_importer vim: Add configurable yank highlight background color (#49517) 2026-02-26 12:01:57 +00:00
theme_selector
time_format time_format: Add Windows implementation (#50227) 2026-02-28 21:47:30 -05:00
title_bar Refresh LLM API token on organization change (#50931) 2026-03-06 19:15:21 +00:00
toolchain_selector Revert "Added support for dismissing the toolchain path selector via … (#49504) 2026-02-18 17:07:10 -05:00
ui agent_ui: Add more refinements for v2 flag (#50968) 2026-03-06 19:47:04 -03:00
ui_input build: Decouple git_ui from recent_projects (#48062) 2026-02-02 13:30:07 +01:00
ui_macros
ui_prompt
util Implement new Multi Agent UI (#50534) 2026-03-05 20:22:28 +00:00
util_macros
vercel project: Move tests to integration layer (#47596) 2026-01-25 21:35:32 +01:00
vim Fix panic in vim increment (#50311) 2026-02-27 13:24:37 -07:00
vim_mode_setting
watch
web_search
web_search_providers cloud_api_client: Send the organization ID in LLM token requests (#50517) 2026-03-04 15:45:33 +01:00
which_key
workspace workspace: Fix dock/panel resizing (#50947) 2026-03-06 15:58:58 +00:00
worktree Fix Linux watcher cleanup for recreated directories (#50412) 2026-03-03 10:11:51 -06:00
worktree_benchmarks gpui: Extract gpui_platform out of gpui (#49277) 2026-02-19 18:57:49 +01:00
x_ai Add support for streaming tool input to more providers (#50682) 2026-03-04 17:36:25 +01:00
zed zed: Clear the FORCE_CLI_MODE environment variable after reading (#46475) 2026-03-06 19:18:33 +00:00
zed_actions repl: Fix duplicate output inside notebooks (#48616) 2026-02-26 00:15:57 +01:00
zed_env_vars
zeta_prompt ep: Unify code in parse_output and zeta_prompt (#50958) 2026-03-06 22:07:54 +02:00
zlog zlog: Fix log file rotation never truncating original file (#50571) 2026-03-03 08:37:58 +00:00
zlog_settings
ztracing ztracing: Annotate more callsites that invoke TreeSitter (#47522) 2026-02-11 11:24:04 +00:00
ztracing_macro