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:
parent
422d57e8a2
commit
691de6b4b3
5 changed files with 7 additions and 0 deletions
|
@ -172,6 +172,7 @@ impl AsyncApp {
|
|||
}
|
||||
|
||||
/// Schedule a future to be polled in the background.
|
||||
#[track_caller]
|
||||
pub fn spawn<Fut, R>(&self, f: impl FnOnce(AsyncApp) -> Fut) -> Task<R>
|
||||
where
|
||||
Fut: Future<Output = R> + 'static,
|
||||
|
@ -297,6 +298,7 @@ impl AsyncWindowContext {
|
|||
|
||||
/// Schedule a future to be executed on the main thread. This is used for collecting
|
||||
/// the results of background tasks and updating the UI.
|
||||
#[track_caller]
|
||||
pub fn spawn<Fut, R>(&self, f: impl FnOnce(AsyncWindowContext) -> Fut) -> Task<R>
|
||||
where
|
||||
Fut: Future<Output = R> + 'static,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue