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 support for strand-schedulers #285

Open
lewissbaker opened this issue Aug 12, 2024 · 0 comments
Open

Add support for strand-schedulers #285

lewissbaker opened this issue Aug 12, 2024 · 0 comments
Labels
design discussion We need to talk about this; there's nothing actionable here yet enhancement New feature or request

Comments

@lewissbaker
Copy link
Collaborator

Some algorithms can have more efficient implementations if they know that the scheduler that they are scheduling work on can only ever execute one thing at a time. Algorithms can potentially avoid needing to perform synchronization if this is the case.

However, we don't yet have any way of querying on a scheduler whether tasks scheduled on that scheduler can potentially execute concurrently or not.

To facilitate this we should provide such a query. This could either take the form of an is_strand query on the scheduler, or potentially a more general max_concurrency query, which callers can then check to see if it's equal to 1.

There may be some cases where a particular algorithm requires a strand-scheduler. We should also consider adding an adapter for a scheduler that returns a new scheduler that is guaranteed to be a strand-scheduler.

@lewissbaker lewissbaker added enhancement New feature or request discussion We need to talk about this; there's nothing actionable here yet design labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design discussion We need to talk about this; there's nothing actionable here yet enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant