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

Can't name parallel Tasks #208

Open
avik-das opened this issue Mar 27, 2019 · 2 comments
Open

Can't name parallel Tasks #208

avik-das opened this issue Mar 27, 2019 · 2 comments

Comments

@avik-das
Copy link

None of the overloads for Task.<T>par(...) allow specifying a string description. The underlying implementation, Par2Task, etc. have the desc field, which is simply set to something like par, par2, etc. When looking at a trace, this makes it hard to understand where a parallel task is defined in the code.

Is there a fundamental reason why there are no overloads for Task.<T>par(...) which accept a human-readable description? I'm happy to add these overloads if there's no objection.

@r00pal
Copy link

r00pal commented Oct 1, 2020

When you are making a task, you can add the name, Something like this

Task<String> task1  = Task.blocking("meaningful_task_name", () - > {
//task logic
});

Task<String> task2  = Task.blocking("meaningful_task_name_2", () - > {
//task logic
});
Task.par(task1, task2);

Hope this helps!

@avik-das
Copy link
Author

avik-das commented Oct 1, 2020

@r00pal that's correct, but you can't name the actual parent task that runs task1 and task2 in parallel. It would still be helpful to see names of the groupings.

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

No branches or pull requests

2 participants