Skip to content

[feat] async_runtime for better async-task tracing #14904

@Tunglies

Description

@Tunglies

Describe the problem

In tokio-console, tracing warnings tasks becomes hard when they warp as location tauri::async_runtime::spawn. Have no clue which exactly task lead to.

Describe the solution you'd like

Some additional track_caller attribute will handle property

+ #[track_caller]
pub fn block_on<F: Future>(task: F) -> F::Output {
  let runtime = RUNTIME.get_or_init(default_runtime);
  runtime.block_on(task)
}

Add on

Image

No add
Image

Alternatives considered

It could be add on when enable the tracing feature.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions