dotnet/BenchmarkDotNet

Add CancellationToken support on non-async benchmark runner APIs

クローズ

#3,204 opened on 2026/07/22

 (4 件のコメント) (0 件のリアクション) (1 人の担当者)C# (1,063 件のフォーク)batch import
good first issueup-for-grabs

Repository metrics

Stars
 (11,472 個のスター)
PR merge metrics
 (平均マージ 5d 9h) (30d で 20 merged PRs)

説明

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

コントリビューターガイド