Add #[track_caller] to gpui foreground executor spawn methods (#24103)

Use of this location info was added in #21758 to help with diagnosing
remote_server panics on drop of tasks on a different thread.

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-02-02 12:20:17 -07:00 committed by GitHub
parent 422d57e8a2
commit 691de6b4b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 0 deletions

View file

@ -1307,6 +1307,7 @@ impl Window {
/// Spawn the future returned by the given closure on the application thread pool.
/// The closure is provided a handle to the current window and an `AsyncWindowContext` for
/// use within your future.
#[track_caller]
pub fn spawn<Fut, R>(&self, cx: &App, f: impl FnOnce(AsyncWindowContext) -> Fut) -> Task<R>
where
R: 'static,