-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
rt: overhaul task hooks #7197
base: master
Are you sure you want to change the base?
rt: overhaul task hooks #7197
Conversation
I'll fix CI tomorrow. |
use std::sync::Arc; | ||
|
||
/// A factory which produces new [`TaskHookHarness`] objects for tasks which either have been | ||
/// spawned in "detached mode" via the builder, or which were spawned from outside the runtime or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is incorrect, and I will need to fix it
Just reading the API, I really like this. I think its an API that allows us to expand in the future (especially if there isn't a huge perf hit by virtue of open-ended I might consider keeping the current hook APIs (but implementing them behind the scenes with the new API). I think, ultimately, they may still be simpler for some use cases. |
Thank you for the feedback! Expandability was one of my main priorities with this changeset, and I'm delighted to hear that others are also excited about this. Regarding keeping both sets of hooks around, I don't think this is a great idea due to the complexity of the systems involved, and I honestly just wanna get rid of the old APIs as they were never very good to begin with. That being said, I don't think it will be much work for folks to migrate over, and my hope is that we can leave this API completely unchanged even while we let it bake prior to stabilization, so hopefully no more migrations will be needed. |
I'm running into some issues with loom, and I'm currently unsure if this is because of an actual issue or just false positives. @Darksonn do you have any idea what might be causing the current failures with the multi-threaded scheduler? |
Hmm, it looks like the loom failure log is not showing up on ci? ... I captured this locally anyway: logs
I haven't looked the entire code, but I suspect there's a data race caused by a concurrent write to an |
One of the loom tests (pool_shutdown) is timing out because it goes on too long, probably because somehow the number of branches is exploding. |
dd81bae
to
75c21b5
Compare
This change overhauls the entire task hooks system so that users can propagate arbitrary information between task hook invocations and pass context data between the hook "harnesses" for parent and child tasks at time of spawn. This is intended to be significantly more extensible and long-term maintainable than the current task hooks system, and should ultimately be much easier to stabilize.
75c21b5
to
8963b5d
Compare
This change overhauls the entire task hooks system so that users can propagate arbitrary information between task hook invocations and pass context data between the hook "harnesses" for parent and child tasks at time of spawn.
This is intended to be significantly more extensible and long-term maintainable than the current task hooks system, and should ultimately be much easier to stabilize.