Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make actix-rt (and actix itself) work with tokio console #445

Closed
msdrigg opened this issue Feb 13, 2022 · 1 comment · Fixed by #454
Closed

Make actix-rt (and actix itself) work with tokio console #445

msdrigg opened this issue Feb 13, 2022 · 1 comment · Fixed by #454

Comments

@msdrigg
Copy link

msdrigg commented Feb 13, 2022

When using tokio-console, all tasks run in actix-rt appear meaningless because they look like they are being run from the same line (see image below for illustrations). This issue used to be a tokio issue, but this was just fixed in this pr (tokio-rs/tokio#4483).

Now, have looked into where actix-rt could add "track_caller" attributes to different functions to have the same effect as tokio, but I don't know if this will work due to how actix-rt spawns futures by sending them across channels to arbiters.

At least actix-rt could add track_caller to a few key functions and this would greatly improve usability.

  1. pub fn block_on<F: Future>(&self, fut: F) -> F::Output {
  2. pub fn block_on<F: Future>(&self, fut: F) -> F::Output {
  3. pub fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
  4. pub fn block_on<F>(&self, f: F) -> F::Output
  5. pub fn spawn<Fut>(f: Fut) -> JoinHandle<Fut::Output>

image

@robjtede
Copy link
Member

robjtede commented Feb 13, 2022

Duplicate of actix/actix-web#2646. Fine to keep it open though since the change will need to happen here.

@robjtede robjtede linked a pull request Apr 25, 2022 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants