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

Add names to tasks #31

Closed
notgull opened this issue Aug 23, 2022 · 1 comment · Fixed by #33
Closed

Add names to tasks #31

notgull opened this issue Aug 23, 2022 · 1 comment · Fixed by #33

Comments

@notgull
Copy link
Member

notgull commented Aug 23, 2022

In order to make it easier to debug tasks, it should be possible to give tasks names.

I was thinking of an API like this:

Task::builder().name("my-task").spawn(async { println!("Hello world!"); });

Where, if the name() was occluded, it would be the same as Task::spawn.

@taiki-e
Copy link
Collaborator

taiki-e commented Sep 24, 2022

Sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants