Add support for strand-schedulers #285
Labels
design
discussion
We need to talk about this; there's nothing actionable here yet
enhancement
New feature or request
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 generalmax_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.
The text was updated successfully, but these errors were encountered: