dotnet/BenchmarkDotNet
Add CancellationToken support on non-async benchmark runner APIs
Chiusa
#3204 aperta il 22 lug 2026
good first issueup-for-grabs
Metriche repository
- Star
- (11.472 stelle)
- Metriche merge PR
- (Merge medio 5g 9h) (20 PR mergiate in 30 g)
Descrizione
Currently BenchmarkDotNet support CancellationToken on Async APIs.
It's also desirable to support CancellationToken on non-async APIs also on BenchmarkSwitcher/BenchmarkRunner.
Expected usage
Use xUnit.v3's TestContext.Current.CancellationToken to run benchmarks.
Without