Skip to content

Conversation

@143mailliw
Copy link
Contributor

This PR allows for a handle to an existing Tokio runtime to be passed to gpui_tokio's initialization function, which means that Tokio runtimes created externally can be used.

Mikayla suggested that the function simply take the runtime from whatever context the initialization function is called from but I think there could reasonably be situations where that isn't the case and this shouldn't have a meaningful impact to code complexity. If you want to use the current context's runtime you can just do gpui_tokio::init_from_handle(cx, Handle::current());.

This doesn't have an impact on the current users of the crate - the existing init() function is functionally unchanged.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 15, 2025
@maxdeviant maxdeviant changed the title feat: Allow external handles to be provided to gpui_tokio Allow external handles to be provided to gpui_tokio Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants