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

[FEATURE REQUEST] No nice way to set priority on !Send tasks #1148

Closed
awused opened this issue Jul 29, 2023 · 2 comments · Fixed by #1207
Closed

[FEATURE REQUEST] No nice way to set priority on !Send tasks #1148

awused opened this issue Jul 29, 2023 · 2 comments · Fixed by #1207
Labels
enhancement New feature or request

Comments

@awused
Copy link
Contributor

awused commented Jul 29, 2023

Right now there is no safe binding exposed to set the priority on !Send callbacks except spawning a !Send channel which is awkward - it took me a bit of digging to even realize that was an option. idle_add_local and timeout_add_local don't expose a priority parameter, idle_source_new, timeout_source_new, do take priorities but they require Send since Source is Send.

@awused awused added the enhancement New feature or request label Jul 29, 2023
@awused awused changed the title [FEATURE REQUEST] No nice to set priority on !Send tasks [FEATURE REQUEST] No nice way to set priority on !Send tasks Jul 29, 2023
@sdroege
Copy link
Member

sdroege commented Aug 7, 2023

Do you want to provide a PR for this? You'd use a ThreadGuard here for the implementation so that it simply panics at runtime if it happens to be sent to another thread.

@awused
Copy link
Contributor Author

awused commented Aug 10, 2023

I might but probably not any time soon, I was able to temporarily work around this by raising the priority of other things, but it's left me with less room to maneuver. If you have a good idea of how you would want it implemented that would probably be a lot faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants