-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RFC for the task arena waiting functionality #1617
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Mike Voss <[email protected]>
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.
I like it. Why is it in draft state? Do you want to elaborate something or write the other idea(s) regarding the waiting of work completion in arenas?
I would be happy to get it initially accepted :) The next thing is to describe the proposed APIs more formally, and perhaps elaborate on the design - for which I would really need some feedback from the development team. |
I do appreciate this topic pops up again. I wonder however if the introduction of an unsafe wait in the tradition of a yield should not be considered, too? I.e. I do something, and then ask the arena to do at least one more task before it returns, i.e. not totally blocking but instructing the scheduler. This way, I can build in fairness into an algorithm. |
@tobiasweinzierl80 Is the idea for an application thread to temporarily join arena and help making progress, or for it to "sleep" until some progress is made by other threads? And in any case, what would trigger the thread to return/wake up - completion of a specific task, completion of a certain amount of unspecified tasks, timeout, or an event external to the arena (or some combination of those)? |
Very good question. In MPI, there is this context of callback points. I don't think that's require here. I think joining the other team without any further progress guarantees is the most useful thing for us. So it eventually will come back, although I don't know when. |
It seems that at this early stage, this RFC is intended to act as an umbrella for possible task arena waiting extensions. If so, should a third category be added to include the temporary-participation case? Perhaps, the API is a generalization of the proposed task_arena::wait_for to include different wait conditions: empty-state of a task group, empty-state or the arena itself, a time or progress condition? |
Description
A proposal to extend the API of task arena with work completion waiting methods.