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 an API to boost a task’s priority #73369

Open
ahoppen opened this issue May 1, 2024 · 1 comment
Open

Add an API to boost a task’s priority #73369

ahoppen opened this issue May 1, 2024 · 1 comment
Labels
concurrency Feature: umbrella label for concurrency language features

Comments

@ahoppen
Copy link
Contributor

ahoppen commented May 1, 2024

There should be an API to increase a task’s priority. I am currently working around the lack of such an API using

Task(priority: targetPriority) {
  await self.resultTask.value
}

Konrad mentioned that we should offer __priorityBoost(task, priority) here: apple/sourcekit-lsp#1208 (comment)

@ahoppen ahoppen added the concurrency Feature: umbrella label for concurrency language features label May 1, 2024
@ktoso
Copy link
Member

ktoso commented May 2, 2024

Thanks for the issue, yes I think this is something we likely should offer even if for spi use for now, because we may have situations where due to other information we know to boost a task -- kind of like your scheduler does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency Feature: umbrella label for concurrency language features
Projects
None yet
Development

No branches or pull requests

2 participants