You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
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.
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
andtimeout_add_local
don't expose a priority parameter,idle_source_new
,timeout_source_new
, do take priorities but they requireSend
sinceSource
isSend
.The text was updated successfully, but these errors were encountered: