dotnet/BenchmarkDotNet

Add CancellationToken support on non-async benchmark runner APIs

Chiusa

#3204 aperta il 22 lug 2026

 (4 commenti) (0 reazioni) (1 assegnatario)C# (1063 fork)batch import
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

Guida contributor