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
Currently we use 'current context' (for non-tokio) and 'spawn_blocking' (for tokio) if the caller doesn't specify a strategy. Both have no concurrency control.
I imagine that spawn blocking might benefit from a default concurrency limit that is the current CPU core count. Maybe that's the default for only non-specified, maybe that's also the default for caller-specified spawn blocking.
And then, current context (as well as block_in_place) you probably don't want to use such a high concurrency limit, since the default is often going to be to have a worker thread per core, so executing in the current context is likely to starve the executor.
Currently we use 'current context' (for non-tokio) and 'spawn_blocking' (for tokio) if the caller doesn't specify a strategy. Both have no concurrency control.
I imagine that spawn blocking might benefit from a default concurrency limit that is the current CPU core count. Maybe that's the default for only non-specified, maybe that's also the default for caller-specified spawn blocking.
And then, current context (as well as
block_in_place
) you probably don't want to use such a high concurrency limit, since the default is often going to be to have a worker thread per core, so executing in the current context is likely to starve the executor.Though, at that point, probably we also would need to give guidance on handling the LIFO slot not being stealable.
I'll be doing some light perf testing to validate an initial use case (tokio-rustls + this crate), so will play around with the above behaviors.
The text was updated successfully, but these errors were encountered: